Class: Yus::Persistence::Og

Inherits:
Object
  • Object
show all
Defined in:
lib/yus/persistence/og.rb

Instance Method Summary collapse

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

#entitiesObject



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