Skip to content

Instantly share code, notes, and snippets.

@docwhat
Forked from practicingruby/refactoring patterns
Created October 2, 2010 18:42
Show Gist options
  • Save docwhat/607881 to your computer and use it in GitHub Desktop.
Save docwhat/607881 to your computer and use it in GitHub Desktop.
Fork this and add your example
class Order
def initialize
@customer = 'Joe Cool'
end
end
class Customer
def initialize name
@name = name
end
attr_reader :name
end
class Order
def initialize
@customer = Customer.new('Joe Cool')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment