Parent

Numeric

Public Instance Methods

method_missing(m, *args, &blk) click to toggle source
     # File lib/van/units/base.rb, line 961
961:   def method_missing(m, *args, &blk)
962:     if args.length == 1
963:       args[0] = (Van::Units::Converter.converter(args[0]) rescue nil) if not args[0].is_a?(Van::Units::Converter)
964:       return Van::Units::Value.new(self, Van::Units::Unit.new({m => 1}, args[0])) if args[0] && args[0].registered?(m)
965:     elsif Van::Units::Converter.current.registered?(m)
966:       raise ::ArgumentError, "Wrong number of arguments" if args.length != 0
967:       return Van::Units::Value.new(self, Van::Units::Unit.new({m => 1}, Van::Units::Converter.current))
968:     end
969:     ::Exception.with_clean_backtrace("method_missing") {
970:       super
971:     }
972:   end
to_value(unit) click to toggle source
     # File lib/van/units/base.rb, line 975
975:   def to_value(unit)
976:     Van::Units::Value.new(self, unit)
977:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.