Class: Moon::EntitySystem::Manager

Inherits:
Object
  • Object
show all
Defined in:
lib/moon/packages/entity_system/manager.rb

Instance Method Summary collapse

Constructor Details

#initializeManager

Returns a new instance of Manager.


4
5
6
# File 'lib/moon/packages/entity_system/manager.rb', line 4

def initialize
  @data = {}
end

Instance Method Details

#fetch(key) ⇒ Object


22
23
24
# File 'lib/moon/packages/entity_system/manager.rb', line 22

def fetch(key)
  @data.fetch(key)
end

#get(key) ⇒ Object Also known as: []


8
9
10
# File 'lib/moon/packages/entity_system/manager.rb', line 8

def get(key)
  @data[key]
end

#listObject


26
27
28
# File 'lib/moon/packages/entity_system/manager.rb', line 26

def list
  @data.values
end

#remove(key) ⇒ Object


18
19
20
# File 'lib/moon/packages/entity_system/manager.rb', line 18

def remove(key)
  @data.delete(key)
end

#set(key, value) ⇒ Object Also known as: []=


13
14
15
# File 'lib/moon/packages/entity_system/manager.rb', line 13

def set(key, value)
  @data[key] = value
end