Module: Medea::ActiveModelMethods
- Included in:
- JasonObject
- Defined in:
- lib/medea/active_model_methods.rb
Instance Method Summary collapse
Instance Method Details
#errors ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/medea/active_model_methods.rb', line 7 def errors obj = Object.new def obj.[](key) [] end def obj.() [] end def obj.any?() false end def obj.count() 0 end obj end |
#persisted? ⇒ Boolean
16 17 18 |
# File 'lib/medea/active_model_methods.rb', line 16 def persisted? jason_state == :stale end |
#to_model ⇒ Object
3 4 5 |
# File 'lib/medea/active_model_methods.rb', line 3 def to_model self end |
#valid? ⇒ Boolean
20 21 22 |
# File 'lib/medea/active_model_methods.rb', line 20 def valid? true end |