class Nis::Unit::Balance

@attr [String] value

Attributes

value[RW]

Public Class Methods

new(value) click to toggle source
# File lib/nis/unit/balance.rb, line 8
def initialize(value)
  @value = value.to_i
end

Public Instance Methods

<=>(other) click to toggle source

@return [Boolean]

# File lib/nis/unit/balance.rb, line 28
def <=>(other)
  @value <=> other.to_i
end
in_nem() click to toggle source

@return [Float]

# File lib/nis/unit/balance.rb, line 13
def in_nem
  @value.to_f / 1_000_000
end
to_i() click to toggle source

@return [Integer]

# File lib/nis/unit/balance.rb, line 23
def to_i
  @value
end
to_s() click to toggle source

@return [String]

# File lib/nis/unit/balance.rb, line 18
def to_s
  @value.to_s
end