Sha256: ac975cacd6fea15c7a9ca78f9214805a60de978da9876272887c55ce0c65dadf
Contents?: true
Size: 325 Bytes
Versions: 1
Compression:
Stored size: 325 Bytes
Contents
class Musterb::RailsLocalsExtractor < Musterb::Extractor attr_reader :parent, :value def initialize(locals, binding, parent) @locals = locals @parent = parent @binding = binding end def [](symbol) if @locals.include? symbol @binding.eval symbol else parent[symbol] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
musterb-1.0.0 | lib/musterb/rails_locals_extractor.rb |