Class: MissileEmitter::BattleField
- Inherits:
- BasicObject
- Defined in:
- lib/missile_emitter/battle_field.rb
Instance Method Summary collapse
-
#initialize(context, *extras, callable) ⇒ BattleField
constructor
A new instance of BattleField.
- #method_missing(*args, &block) ⇒ Object
Constructor Details
#initialize(context, *extras, callable) ⇒ BattleField
Returns a new instance of BattleField.
4 5 6 |
# File 'lib/missile_emitter/battle_field.rb', line 4 def initialize(context, *extras, callable) @context, @extras, @handler = context, extras, callable end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object
8 9 10 |
# File 'lib/missile_emitter/battle_field.rb', line 8 def method_missing(*args, &block) @handler.call @context, *@extras, *args, &block end |