class NumRu::Units::MulNode
Public Class Methods
new(lhs, rhs)
click to toggle source
# File lib/numru/units.rb, line 2533 def initialize(lhs, rhs) @lhs, @rhs = lhs, rhs end
Public Instance Methods
to_s()
click to toggle source
# File lib/numru/units.rb, line 2537 def to_s lhs = @lhs.to_s rhs = @rhs.to_s if (/\d$/ =~ lhs && /^\w/ =~ rhs) then "#{lhs} #{rhs}" else "#{lhs}.#{rhs}" end end