Sha256: 5600ec4bf6a465effa88ea50274f1b87da33a37933d3c2696b9d2d2f84f10846

Contents?: true

Size: 326 Bytes

Versions: 22

Compression:

Stored size: 326 Bytes

Contents

module MissileEmitter
  class BattleField < BasicObject

    def initialize(context, *extras, callable)
      @context, @extras, @handler = context, extras, callable
    end

    def method_missing(*args, &block)
      @handler.call @context, *@extras, *args, &block
    end

    alias_method :emit!, :instance_eval

  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
missile_emitter-0.4.10 lib/missile_emitter/battle_field.rb
missile_emitter-0.4.01 lib/missile_emitter/battle_field.rb
missile_emitter-0.3.20 lib/missile_emitter/battle_field.rb
missile_emitter-0.3.19 lib/missile_emitter/battle_field.rb
missile_emitter-0.3.18 lib/missile_emitter/battle_field.rb
missile_emitter-0.3.17 lib/missile_emitter/battle_field.rb
missile_emitter-0.3.16 lib/missile_emitter/battle_field.rb
missile_emitter-0.3.14 lib/missile_emitter/battle_field.rb
missile_emitter-0.3.13 lib/missile_emitter/battle_field.rb
missile_emitter-0.3.12 lib/missile_emitter/battle_field.rb
missile_emitter-0.3.11 lib/missile_emitter/battle_field.rb
missile_emitter-0.3.10 lib/missile_emitter/battle_field.rb
missile_emitter-0.3.9 lib/missile_emitter/battle_field.rb
missile_emitter-0.3.8 lib/missile_emitter/battle_field.rb
missile_emitter-0.3.7 lib/missile_emitter/battle_field.rb
missile_emitter-0.3.6 lib/missile_emitter/battle_field.rb
missile_emitter-0.3.5 lib/missile_emitter/battle_field.rb
missile_emitter-0.3.4 lib/missile_emitter/battle_field.rb
missile_emitter-0.3.3 lib/missile_emitter/battle_field.rb
missile_emitter-0.3.2 lib/missile_emitter/battle_field.rb