Class: EInvoice::Duration
- Inherits:
-
Object
- Object
- EInvoice::Duration
- Defined in:
- lib/e_invoice/duration.rb
Instance Attribute Summary collapse
-
#endpoints ⇒ Object
readonly
Returns the value of attribute endpoints.
Instance Method Summary collapse
-
#initialize(start_date = 3.months.ago, end_date = Time.current) ⇒ Duration
constructor
A new instance of Duration.
Constructor Details
#initialize(start_date = 3.months.ago, end_date = Time.current) ⇒ Duration
Returns a new instance of Duration.
7 8 9 10 11 |
# File 'lib/e_invoice/duration.rb', line 7 def initialize(start_date = 3.months.ago, end_date = Time.current) @start_date = Date.parse(start_date.to_s) @end_date = Date.parse(end_date.to_s) @endpoints = divided_by_month end |
Instance Attribute Details
#endpoints ⇒ Object (readonly)
Returns the value of attribute endpoints.
5 6 7 |
# File 'lib/e_invoice/duration.rb', line 5 def endpoints @endpoints end |