Sha256: 41ebecbb8c0e34c0befdce90eaa4ce27af86ab3165fa4da600cd5093539292b4

Contents?: true

Size: 210 Bytes

Versions: 2

Compression:

Stored size: 210 Bytes

Contents

class Musterb::BindingExtractor
  def initialize(_binding)
    @binding = _binding
  end

  def [](symbol)
    @binding.eval <<-EOF
    begin
      #{symbol}
    rescue NameError
      nil
    end
EOF
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
musterb-0.0.2 lib/musterb/binding_extractor.rb
musterb-0.0.1 lib/musterb/binding_extractor.rb