Class: ApiBomb::Army

Inherits:
Object
  • Object
show all
Defined in:
lib/api_bomb/army.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fighters:) ⇒ Army

Returns a new instance of Army.



4
5
6
# File 'lib/api_bomb/army.rb', line 4

def initialize(fighters:)
  @fighters = fighters
end

Instance Attribute Details

#fightersObject (readonly)

Returns the value of attribute fighters.



2
3
4
# File 'lib/api_bomb/army.rb', line 2

def fighters
  @fighters
end

Instance Method Details

#send_fighterObject Also known as: send_new_fighter



8
9
10
# File 'lib/api_bomb/army.rb', line 8

def send_fighter
  @fighters.future.fire
end