Class: Mack::Data::OrmBridge::DataMapper
- Defined in:
- lib/mack-data_factory/orm_api_bridge/orm/data_mapper.rb
Overview
:nodoc:
Instance Method Summary collapse
- #can_handle(obj) ⇒ Object
- #count(obj, *args) ⇒ Object
- #get(obj, *args) ⇒ Object
- #get_all(obj, *args) ⇒ Object
- #get_first(obj, *args) ⇒ Object
- #save(obj, *args) ⇒ Object
Instance Method Details
#can_handle(obj) ⇒ Object
6 7 8 9 |
# File 'lib/mack-data_factory/orm_api_bridge/orm/data_mapper.rb', line 6 def can_handle(obj) return false if !Object.const_defined?('DataMapper') return obj.ancestors.include?(::DataMapper::Resource) end |
#count(obj, *args) ⇒ Object
19 20 21 |
# File 'lib/mack-data_factory/orm_api_bridge/orm/data_mapper.rb', line 19 def count(obj, *args) obj.count(*args) end |
#get(obj, *args) ⇒ Object
11 12 13 |
# File 'lib/mack-data_factory/orm_api_bridge/orm/data_mapper.rb', line 11 def get(obj, *args) obj.get(*args) end |
#get_all(obj, *args) ⇒ Object
15 16 17 |
# File 'lib/mack-data_factory/orm_api_bridge/orm/data_mapper.rb', line 15 def get_all(obj, *args) obj.all(*args) end |
#get_first(obj, *args) ⇒ Object
27 28 29 |
# File 'lib/mack-data_factory/orm_api_bridge/orm/data_mapper.rb', line 27 def get_first(obj, *args) obj.first(*args) end |
#save(obj, *args) ⇒ Object
23 24 25 |
# File 'lib/mack-data_factory/orm_api_bridge/orm/data_mapper.rb', line 23 def save(obj, *args) obj.save end |