lib/musterb/object_extractor.rb in musterb-0.2.0 vs lib/musterb/object_extractor.rb in musterb-1.0.0
- old
+ new
@@ -1,16 +1,16 @@
-class Musterb::ObjectExtractor
+class Musterb::ObjectExtractor < Musterb::Extractor
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
end
-end
\ No newline at end of file
+end