Class: ApiBomb::Army
- Inherits:
-
Object
- Object
- ApiBomb::Army
- Defined in:
- lib/api_bomb/army.rb
Instance Attribute Summary collapse
-
#fighters ⇒ Object
readonly
Returns the value of attribute fighters.
Instance Method Summary collapse
-
#initialize(fighters:) ⇒ Army
constructor
A new instance of Army.
- #send_fighter ⇒ Object (also: #send_new_fighter)
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
#fighters ⇒ Object (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_fighter ⇒ Object Also known as: send_new_fighter
8 9 10 |
# File 'lib/api_bomb/army.rb', line 8 def send_fighter @fighters.future.fire end |