Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/rvgp/journal.rb

Overview

Extensions to the ruby stdlib implementation of String. Offered as a convenience.

Instance Method Summary collapse

Instance Method Details

#to_commodityRVGP::Journal::Commodity

Given a string, such as “$ 20.57”, or “1 MERCEDESBENZ”, Construct and return a RVGP::Journal::Commodity representation. see RVGP::Journal::Commodity.from_s

Returns:

[View source]

15
16
17
# File 'lib/rvgp/journal.rb', line 15

def to_commodity
  RVGP::Journal::Commodity.from_s self
end

#to_tagObject

[View source]

21
22
23
# File 'lib/rvgp/journal.rb', line 21

def to_tag
  RVGP::Journal::Posting::Tag.from_s self
end