lib/fig_newton/missing.rb in fig_newton-0.7 vs lib/fig_newton/missing.rb in fig_newton-0.8
- old
+ new
@@ -4,9 +4,11 @@
module Missing
def method_missing(*args, &block)
read_file unless @yml
m = args.first
value = @yml[m.to_s]
+ value = args[1] unless value
+ value = block.call(m.to_s) unless value or block.nil?
super unless value
value = FigNewton::Node.new(value) unless type_known? value
value
end