lib/musterb/object_extractor.rb in musterb-0.0.1 vs lib/musterb/object_extractor.rb in musterb-0.0.2
- old
+ new
@@ -1,13 +1,13 @@
-class ObjectExtractor
- attr_reader :parent
+class Musterb::ObjectExtractor
+ attr_reader :parent, :value
def initialize(value, parent)
@value = value
@parent = parent
end
- def [](symbol)
+ def [](symbol)
if @value.respond_to? symbol
@value.send(symbol)
else
@parent[symbol]
end
\ No newline at end of file