Class: Buxfer::Report
- Inherits:
-
Object
- Object
- Buxfer::Report
- Defined in:
- lib/buxfer/report.rb
Instance Method Summary collapse
- #[](value) ⇒ Object
- #image_url ⇒ Object
-
#initialize(data) ⇒ Report
constructor
A new instance of Report.
- #tag_names ⇒ Object
- #tags ⇒ Object
- #to_s ⇒ Object
Constructor Details
Instance Method Details
#[](value) ⇒ Object
14 15 16 |
# File 'lib/buxfer/report.rb', line 14 def [](value) .detect{|tag| tag.name == value } end |
#image_url ⇒ Object
10 11 12 |
# File 'lib/buxfer/report.rb', line 10 def image_url @data['imageURL'] end |
#tag_names ⇒ Object
22 23 24 |
# File 'lib/buxfer/report.rb', line 22 def tag_names .map(&:name) end |
#tags ⇒ Object
18 19 20 |
# File 'lib/buxfer/report.rb', line 18 def @tags end |
#to_s ⇒ Object
26 27 28 |
# File 'lib/buxfer/report.rb', line 26 def to_s .collect{|t| [t.name, t.amount].join(': ') }.join("\n") end |