This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The idea here is to emulate Groovy's delegate= pattern for closures. | |
# We define a builder module. This will receive method calls | |
# from our builder. It could be an instance of an object if we wanted. | |
module FamilyBuilder | |
def self.parent(name) | |
puts "Parent: #{name}" | |
end | |
def self.child(name) |
NewerOlder