class Numeric

Public Instance Methods

coerce(other) click to toggle source
Calls superclass method
# File lib/m500.rb, line 318
def coerce(other)
  if Natural === other or Counting === other or Zahlen === other  or Quotient === other or Fraction === other
    [other.to_i,self]
  else
    super
  end
end
irrational?() click to toggle source
# File lib/m500.rb, line 312
def irrational?
  false
end
rational?() click to toggle source
# File lib/m500.rb, line 315
def rational?
  true
end
sgml_id() click to toggle source
# File lib/m500.rb, line 277
def sgml_id
  ret = ""
  @idsgml ? ret = "id='#{self.class.to_s.downcase}#{self.object_id}' " : ret = ""
  ret
end
to_Dec() click to toggle source
# File lib/m500.rb, line 300
def to_Dec
  self
end
to_Frac() click to toggle source
# File lib/m500.rb, line 294
def to_Frac
  self
end
to_K() click to toggle source
# File lib/m500.rb, line 306
def to_K
  self
end
to_N() click to toggle source
# File lib/m500.rb, line 285
def to_N
  self
end
to_N0() click to toggle source
# File lib/m500.rb, line 288
def to_N0
  self
end
to_Q() click to toggle source
# File lib/m500.rb, line 297
def to_Q
  self
end
to_R() click to toggle source
# File lib/m500.rb, line 309
def to_R
  self
end
to_Sig() click to toggle source
# File lib/m500.rb, line 303
def to_Sig
  self
end
to_Z() click to toggle source
# File lib/m500.rb, line 291
def to_Z
  self
end
to_sgml() click to toggle source
# File lib/m500.rb, line 282
def to_sgml
  "<mn #{sgml_id}class='numeric'>#{self.to_s}</mn>"
end