Created
October 29, 2015 03:42
-
-
Save mtwilliams/110a2fbdc643582690fb to your computer and use it in GitHub Desktop.
This file contains 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
class Verse | |
include Pourable | |
property :meaning_of_life, :integer, :default => 42, | |
many :inhabitants, Inhabitant, :id => :name, | |
:merge => false | |
end | |
class Inhabitant | |
include Pourable | |
named | |
property :loves_dark_chocolate, :boolean, :default => true | |
property :loves_red_wine, :boolean, :default => true | |
end | |
universe = Verse.new do |universe| | |
universe.inhabitant name: 'Michael Williams' do |mike| | |
mike.loves_dark_chocolate = true | |
mike.loves_red_wine = true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment