Class: Yus::Persistence::Og
- Inherits:
-
Object
- Object
- Yus::Persistence::Og
- Defined in:
- lib/yus/persistence/og.rb
Instance Method Summary collapse
- #add_entity(entity) ⇒ Object
- #entities ⇒ Object
- #find_entity(name) ⇒ Object
- #save_entity(entity) ⇒ Object
Instance Method Details
#add_entity(entity) ⇒ Object
11 12 13 |
# File 'lib/yus/persistence/og.rb', line 11 def add_entity(entity) entity.save end |
#entities ⇒ Object
14 15 16 |
# File 'lib/yus/persistence/og.rb', line 14 def entities Entity.find_all end |
#find_entity(name) ⇒ Object
17 18 19 |
# File 'lib/yus/persistence/og.rb', line 17 def find_entity(name) Entity.find_by_name(name) end |
#save_entity(entity) ⇒ Object
20 21 22 |
# File 'lib/yus/persistence/og.rb', line 20 def save_entity(entity) entity.save end |