Class: Renalware::HD::Scheduling::ArchiveArguments
- Inherits:
-
Object
- Object
- Renalware::HD::Scheduling::ArchiveArguments
- Defined in:
- app/models/renalware/hd/scheduling/archive_arguments.rb
Instance Attribute Summary collapse
-
#from_week_period ⇒ Object
readonly
Returns the value of attribute from_week_period.
-
#to_week_period ⇒ Object
readonly
Returns the value of attribute to_week_period.
-
#up_until_date ⇒ Object
readonly
Returns the value of attribute up_until_date.
Instance Method Summary collapse
-
#initialize(from: nil, to: nil) ⇒ ArchiveArguments
constructor
A new instance of ArchiveArguments.
Constructor Details
#initialize(from: nil, to: nil) ⇒ ArchiveArguments
Returns a new instance of ArchiveArguments.
11 12 13 14 15 |
# File 'app/models/renalware/hd/scheduling/archive_arguments.rb', line 11 def initialize(from: nil, to: nil) @from_week_period = WeekPeriod.from_date(from || 1.year.ago) @up_until_date = (to || Time.zone.now - 1.day).to_date @to_week_period = WeekPeriod.from_date(@up_until_date) end |
Instance Attribute Details
#from_week_period ⇒ Object (readonly)
Returns the value of attribute from_week_period.
9 10 11 |
# File 'app/models/renalware/hd/scheduling/archive_arguments.rb', line 9 def from_week_period @from_week_period end |
#to_week_period ⇒ Object (readonly)
Returns the value of attribute to_week_period.
9 10 11 |
# File 'app/models/renalware/hd/scheduling/archive_arguments.rb', line 9 def to_week_period @to_week_period end |
#up_until_date ⇒ Object (readonly)
Returns the value of attribute up_until_date.
9 10 11 |
# File 'app/models/renalware/hd/scheduling/archive_arguments.rb', line 9 def up_until_date @up_until_date end |