Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/rvgp/journal.rb
Overview
Extensions to the ruby stdlib implementation of String. Offered as a convenience.
Instance Method Summary collapse
-
#to_commodity ⇒ RVGP::Journal::Commodity
Given a string, such as “$ 20.57”, or “1 MERCEDESBENZ”, Construct and return a RVGP::Journal::Commodity representation.
-
#to_tag ⇒ Object
Parse a string, into a RVGP::Journal::Posting::Tag object see RVGP::Journal::Posting::Tag.from_s.
Instance Method Details
#to_commodity ⇒ RVGP::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
15 16 17 |
# File 'lib/rvgp/journal.rb', line 15 def to_commodity RVGP::Journal::Commodity.from_s self end |
#to_tag ⇒ Object
Parse a string, into a RVGP::Journal::Posting::Tag object see RVGP::Journal::Posting::Tag.from_s
21 22 23 |
# File 'lib/rvgp/journal.rb', line 21 def to_tag RVGP::Journal::Posting::Tag.from_s self end |