4 # remove some methods that might clash with commonly
5 # used return data to improve the effectiveness of the
6 # method_missing lookup strategy
7 undef :type if method_defined?(:type)
9 def initialize(outputs)
12 outputs.keys.each do |output|
13 @data[output] = outputs[output].fetch(:default, nil)
18 @data.include?(key.to_sym)
26 raise "Can only store String, Integer, Float or Boolean data but got #{val.class} for key #{key}" unless [String, Fixnum, Bignum, Float, TrueClass, FalseClass].include?(val.class)
28 @data[key.to_sym] = val
35 def method_missing(method, *args)
38 raise NoMethodError, "undefined local variable or method `%s'" % key unless include?(key)