Class: WirisPlugin::JSonIntegerFormat
- Inherits:
-
Object
- Object
- WirisPlugin::JSonIntegerFormat
- Includes:
- Wiris
- Defined in:
- lib/com/wiris/util/json/JSonIntegerFormat.rb
Constant Summary collapse
- HEXADECIMAL =
0
Instance Attribute Summary collapse
-
#format ⇒ Object
Returns the value of attribute format.
-
#n ⇒ Object
Returns the value of attribute n.
Instance Method Summary collapse
-
#initialize(n, format) ⇒ JSonIntegerFormat
constructor
A new instance of JSonIntegerFormat.
- #toString ⇒ Object
Constructor Details
#initialize(n, format) ⇒ JSonIntegerFormat
Returns a new instance of JSonIntegerFormat.
9 10 11 12 13 |
# File 'lib/com/wiris/util/json/JSonIntegerFormat.rb', line 9 def initialize(n, format) super() self.n = n self.format = format end |
Instance Attribute Details
#format ⇒ Object
Returns the value of attribute format.
8 9 10 |
# File 'lib/com/wiris/util/json/JSonIntegerFormat.rb', line 8 def format @format end |
#n ⇒ Object
Returns the value of attribute n.
7 8 9 |
# File 'lib/com/wiris/util/json/JSonIntegerFormat.rb', line 7 def n @n end |
Instance Method Details
#toString ⇒ Object
14 15 16 17 18 19 |
# 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 |