Sha256: f9344021e4f92250335d3a34b4f64654e688282934ab95f6f384f57e7ad1f513

Contents?: true

Size: 509 Bytes

Versions: 8

Compression:

Stored size: 509 Bytes

Contents

module Coupler
  module Models
    class Transformer
      class Runner
        instance_methods.each do |m|
          undef_method m unless m =~ /^__|^instance_eval$/
        end

        def initialize(code, input)
          @input = input
          @code = code
        end

        def run
          instance_eval(@code, __FILE__, __LINE__)
        end

        def value
          @input
        end

        def method_missing(name)
          raise NoMethodError
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
coupler-0.0.9-java lib/coupler/models/transformer/runner.rb
coupler-0.0.8-java lib/coupler/models/transformer/runner.rb
coupler-0.0.7-java lib/coupler/models/transformer/runner.rb
coupler-0.0.6-java lib/coupler/models/transformer/runner.rb
coupler-0.0.4-java lib/coupler/models/transformer/runner.rb
coupler-0.0.3-java lib/coupler/models/transformer/runner.rb
coupler-0.0.2-java lib/coupler/models/transformer/runner.rb
coupler-0.0.1-java lib/coupler/models/transformer/runner.rb