Class: MachinistCouchrestModel::Lathe
- Inherits:
-
Machinist::Lathe
- Object
- Machinist::Lathe
- MachinistCouchrestModel::Lathe
- Defined in:
- lib/machinist_couchrest_model/lathe.rb
Instance Method Summary collapse
-
#make_association(attribute, args) ⇒ Object
:nodoc:.
-
#make_one_value(attribute, args) ⇒ Object
:nodoc:.
Instance Method Details
#make_association(attribute, args) ⇒ Object
:nodoc:
14 15 16 17 18 19 20 21 22 |
# File 'lib/machinist_couchrest_model/lathe.rb', line 14 def make_association(attribute, args) #:nodoc: raise NotImplementedError, "Associations are not yet supported" # association = @klass.reflect_on_association(attribute) # if association # association.klass.make(*args) # else # raise_argument_error(attribute) # end end |
#make_one_value(attribute, args) ⇒ Object
:nodoc:
5 6 7 8 9 10 11 12 |
# File 'lib/machinist_couchrest_model/lathe.rb', line 5 def make_one_value(attribute, args) #:nodoc: if block_given? raise_argument_error(attribute) unless args.empty? yield else make_association(attribute, args) end end |