Class: Subledger::Domain::Debit

Inherits:
Object
  • Object
show all
Includes:
Value
Defined in:
lib/subledger/domain/value/debit.rb

Instance Attribute Summary

Attributes included from Value

#amount

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Value

#+, #==, included, #initialize, #to_s, #value

Class Method Details

.typeObject



7
8
9
# File 'lib/subledger/domain/value/debit.rb', line 7

def self.type
  'debit'
end

Instance Method Details

#rest_hashObject



11
12
13
# File 'lib/subledger/domain/value/debit.rb', line 11

def rest_hash
  { 'type' => 'debit', 'amount' => amount_to_s(@amount) }
end