Class: Abstracta::Developer

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/abstracta/developer.rb

Direct Known Subclasses

TerritoryDeveloper, WorldDeveloper

Instance Method Summary collapse

Constructor Details

#initialize(entity) ⇒ Developer

Returns a new instance of Developer.



4
5
6
# File 'lib/abstracta/developer.rb', line 4

def initialize(entity)
  @entity = entity
end

Instance Method Details

#collectionObject



8
# File 'lib/abstracta/developer.rb', line 8

def collection; [] end

#step(*args) ⇒ Object



14
15
16
17
18
# File 'lib/abstracta/developer.rb', line 14

def step(*args)
  tick
  develop(*args)
  collection.map(&:step)
end

#tickObject



10
11
12
# File 'lib/abstracta/developer.rb', line 10

def tick
  @entity.age!
end