Sha256: fd9f63f09f4c39b3890858c6f7679c5e10f476fc9e4889d6a651ed61c0ca0d5a
Contents?: true
Size: 340 Bytes
Versions: 1
Compression:
Stored size: 340 Bytes
Contents
class Musterb::InstanceVariableExtractor < Musterb::Extractor attr_reader :parent, :value def initialize(value, parent) @value = value @parent = parent end def [](symbol) if value.instance_variable_defined?("@#{symbol}") value.instance_variable_get("@#{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/instance_variable_extractor.rb |