Class: Journala::Value

Inherits:
BigDecimal
  • Object
show all
Defined in:
lib/journala/value.rb

Instance Method Summary collapse

Instance Method Details

#inspectObject



3
4
5
6
7
8
9
# File 'lib/journala/value.rb', line 3

def inspect
  if self < 0
    '-$%.2f' % (0 - to_f)
  else
    '$%.2f' % to_f
  end
end

#lengthObject



15
16
17
# File 'lib/journala/value.rb', line 15

def length
  inspect.length
end

#to_sObject



11
12
13
# File 'lib/journala/value.rb', line 11

def to_s
  inspect
end