lib/musterb/extract_values.rb in musterb-1.0.0 vs lib/musterb/extract_values.rb in musterb-1.0.1
- old
+ new
@@ -9,13 +9,11 @@
def chain(symbol)
Musterb::Chain.new self[symbol]
end
- def self.new_context(value, old_context = @context)
+ def self.new_context(value, old_context = Musterb::NullExtractor.new)
case value
- when Musterb::Extractor
- value
when Hash
Musterb::HashExtractor.new(value, old_context)
when nil
Musterb::NullExtractor.new(old_context)
else