Class: BBNW::Billable
- Inherits:
-
Object
- Object
- BBNW::Billable
- Defined in:
- lib/adapters/base/billable.rb
Instance Attribute Summary collapse
-
#descriptions ⇒ Object
Returns the value of attribute descriptions.
-
#total_time ⇒ Object
Returns the value of attribute total_time.
Instance Method Summary collapse
- #all_descriptions(header = "") ⇒ Object
-
#initialize ⇒ Billable
constructor
A new instance of Billable.
Constructor Details
#initialize ⇒ Billable
Returns a new instance of Billable.
5 6 7 8 |
# File 'lib/adapters/base/billable.rb', line 5 def initialize @descriptions = [] @total_time = 0 end |
Instance Attribute Details
#descriptions ⇒ Object
Returns the value of attribute descriptions.
3 4 5 |
# File 'lib/adapters/base/billable.rb', line 3 def descriptions @descriptions end |
#total_time ⇒ Object
Returns the value of attribute total_time.
3 4 5 |
# File 'lib/adapters/base/billable.rb', line 3 def total_time @total_time end |
Instance Method Details
#all_descriptions(header = "") ⇒ Object
10 11 12 13 14 |
# File 'lib/adapters/base/billable.rb', line 10 def all_descriptions(header = "") descriptions = "#{header}\n\n" descriptions+= @descriptions.join("\n\n") descriptions end |