Methods
N
C
R
Constants
STEP = BigDecimal.new("10")**BigDecimal.new("30")
 
Class Public methods
NANO_to_raw(nano)
# File lib/nanook/util.rb, line 8
def self.NANO_to_raw(nano)
  (BigDecimal.new(nano.to_s) * STEP).to_i
end
coerce_empty_string_to_type(response, type)
# File lib/nanook/util.rb, line 16
def self.coerce_empty_string_to_type(response, type)
  if response == ""
    return type.new
  end

  response
end
raw_to_NANO(raw)
# File lib/nanook/util.rb, line 12
def self.raw_to_NANO(raw)
  raw.to_f / STEP
end