Module: DmAdapter::InstanceMethods
- Defined in:
- lib/models/dm_adapter.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object
56
57
58
59
|
# File 'lib/models/dm_adapter.rb', line 56
def method_missing(meth, *args, &block)
@instance.send(meth, *args, &block)
end
|
Instance Method Details
#errors ⇒ Object
45
46
47
48
49
|
# File 'lib/models/dm_adapter.rb', line 45
def errors
@instance.errors.collect do |k,v|
"#{k} #{v}"
end.join(', ')
end
|
#update(attributes) ⇒ Object
51
52
53
54
|
# File 'lib/models/dm_adapter.rb', line 51
def update(attributes)
@instance.update attributes
end
|
#valid ⇒ Object
41
42
43
|
# File 'lib/models/dm_adapter.rb', line 41
def valid
@instance.valid?
end
|