(?)
Quotes are added by the Goodreads community and are not verified by Goodreads. (Learn more)
Paolo Perrotta

“   class Computer      def initialize(computer_id, data_source)        @id = computer_id        @data_source = data_source      end             »    def self.define_component(name) »      define_method(name) do »        info = @data_source.send "get_#{name}_info", @id »        price = @data_source.send "get_#{name}_price", @id »        result = "#{name.to_s.capitalize}: #{info} ($#{price})" »        return "* #{result}" if price >= 100 »        result  »      end       »    end         »   »    define_component :mouse »    define_component :cpu »    define_component :keyboard    end          ”

Paolo Perrotta, Metaprogramming Ruby: Program Like the Ruby Pros
Read more quotes from Paolo Perrotta


Share this quote:
Share on Twitter

Friends Who Liked This Quote

To see what your friends thought of this quote, please sign up!

0 likes
All Members Who Liked This Quote

None yet!


This Quote Is From

Metaprogramming Ruby: Program Like the Ruby Pros Metaprogramming Ruby: Program Like the Ruby Pros by Paolo Perrotta
777 ratings, average rating, 45 reviews

Browse By Tag