Module: Ars::Familiar::DSL
- Defined in:
- lib/ars/familiar.rb
Instance Attribute Summary collapse
-
#builder ⇒ Object
readonly
Returns the value of attribute builder.
Instance Method Summary collapse
Instance Attribute Details
#builder ⇒ Object (readonly)
Returns the value of attribute builder.
11 12 13 |
# File 'lib/ars/familiar.rb', line 11 def builder @builder end |
Instance Method Details
#realize_attributes! ⇒ Object
23 24 25 26 |
# File 'lib/ars/familiar.rb', line 23 def realize_attributes! primary_key builder.primary_key if builder.primary_key? attributes builder.attributes_to_define end |
#realize_relationships!(**opts) ⇒ Object
28 29 30 31 32 |
# File 'lib/ars/familiar.rb', line 28 def realize_relationships!(**opts) builder.relationships_to_define(opts).each do |relationship| self.send(*relationship) end end |