lib/musterb/extract_values.rb in musterb-0.2.0 vs lib/musterb/extract_values.rb in musterb-1.0.0

- old
+ new

@@ -9,17 +9,23 @@ def chain(symbol) Musterb::Chain.new self[symbol] end - private - def new_context(value, old_context = @context) + def self.new_context(value, old_context = @context) case value + when Musterb::Extractor + value when Hash Musterb::HashExtractor.new(value, old_context) when nil Musterb::NullExtractor.new(old_context) else Musterb::ObjectExtractor.new(value, old_context) end end -end \ No newline at end of file + + private + def new_context(value, old_context = @context) + Musterb::ExtractValues.new_context(value, old_context) + end +end