Class: RVGP::Pta::Ledger::Output::XmlBase::Commodity

Inherits:
Base::Reader
  • Object
show all
Defined in:
lib/rvgp/pta/ledger.rb

Overview

A commodity, as defined by ledger’s xml meta-output. This is largely for the purpose of tracking exchange rates that were automatically deduced by ledger during the parsing of a journal. And, which, are stored in the :Ledger::Output::XmlBase#commodities collection. hledger does not have this feature.

Instance Attribute Summary collapse

Attributes inherited from Base::Reader

#options

Method Summary

Methods inherited from Base::Reader

readers

Instance Attribute Details

#dateTime (readonly)

The datetime when this commodity was declared or deduced

Returns:

  • (Time)

    the current value of date



40
41
42
# File 'lib/rvgp/pta/ledger.rb', line 40

def date
  @date
end

#priceRVGP::Journal::Commodity (readonly)

The exchange price

Returns:



40
41
42
# File 'lib/rvgp/pta/ledger.rb', line 40

def price
  @price
end

#symbolString (readonly)

A three letter currency code

Returns:

  • (String)

    the current value of symbol



40
41
42
# File 'lib/rvgp/pta/ledger.rb', line 40

def symbol
  @symbol
end