class WirisPlugin::JSonIntegerFormat

Constants

HEXADECIMAL

Attributes

format[RW]
n[RW]

Public Class Methods

new(n, format) click to toggle source
Calls superclass method
# File lib/com/wiris/util/json/JSonIntegerFormat.rb, line 9
def initialize(n, format)
    super()
    self.n = n
    self.format = format
end

Public Instance Methods

toString() click to toggle source
# File lib/com/wiris/util/json/JSonIntegerFormat.rb, line 14
def toString()
    if @format == HEXADECIMAL
        return "0x" + StringTools::hex(@n,0).to_s
    end
    return "" + @n.to_s
end