Provides the new_units class method to all classes with units
extend MathViz::Units::Class
# File lib/mathviz.rb, line 209 def included(host) host.extend(MathViz::Units::Class) end
Define new units (instance methods) on module MathViz::Units (where they will be picked up by everything including the module) Defined methods are essentialy aliases for unit(name); see MathViz::Measurable / MathViz::Measured
# File lib/mathviz.rb, line 200 def new_units(*units) units.each do |u| MathViz::Units.__send__ :define_method, u do unit(u) end end end
Generated with the Darkfish Rdoc Generator 2.