Sha256: 274356d852663c65f0a722ae98ac346833ab75625b758ccf366a6574c9796f28
Contents?: true
Size: 390 Bytes
Versions: 4
Compression:
Stored size: 390 Bytes
Contents
# frozen_string_literal: true module Troy class Context def initialize(options = {}) options.each do |name, value| instance_variable_set("@#{name}", value) instance_eval <<-RUBY def #{name} # def name @#{name} # @name end # end RUBY end end def to_binding binding end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
troy-0.0.39 | lib/troy/context.rb |
troy-0.0.38 | lib/troy/context.rb |
troy-0.0.37 | lib/troy/context.rb |
troy-0.0.36 | lib/troy/context.rb |