Class: Renalware::HD::FindOrCreateDiaryByWeekQuery
- Inherits:
-
Object
- Object
- Renalware::HD::FindOrCreateDiaryByWeekQuery
- Defined in:
- app/models/renalware/hd/find_or_create_diary_by_week_query.rb
Instance Attribute Summary collapse
-
#by ⇒ Object
readonly
Returns the value of attribute by.
-
#period ⇒ Object
readonly
Returns the value of attribute period.
-
#relation ⇒ Object
readonly
Returns the value of attribute relation.
-
#unit_id ⇒ Object
readonly
Returns the value of attribute unit_id.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(unit_id:, week_period:, by:, relation: WeeklyDiary.all) ⇒ FindOrCreateDiaryByWeekQuery
constructor
A new instance of FindOrCreateDiaryByWeekQuery.
Constructor Details
#initialize(unit_id:, week_period:, by:, relation: WeeklyDiary.all) ⇒ FindOrCreateDiaryByWeekQuery
Returns a new instance of FindOrCreateDiaryByWeekQuery.
14 15 16 17 18 19 |
# File 'app/models/renalware/hd/find_or_create_diary_by_week_query.rb', line 14 def initialize(unit_id:, week_period:, by:, relation: WeeklyDiary.all) @relation = relation @period = week_period @unit_id = unit_id @by = by end |
Instance Attribute Details
#by ⇒ Object (readonly)
Returns the value of attribute by.
12 13 14 |
# File 'app/models/renalware/hd/find_or_create_diary_by_week_query.rb', line 12 def by @by end |
#period ⇒ Object (readonly)
Returns the value of attribute period.
12 13 14 |
# File 'app/models/renalware/hd/find_or_create_diary_by_week_query.rb', line 12 def period @period end |
#relation ⇒ Object (readonly)
Returns the value of attribute relation.
12 13 14 |
# File 'app/models/renalware/hd/find_or_create_diary_by_week_query.rb', line 12 def relation @relation end |
#unit_id ⇒ Object (readonly)
Returns the value of attribute unit_id.
12 13 14 |
# File 'app/models/renalware/hd/find_or_create_diary_by_week_query.rb', line 12 def unit_id @unit_id end |
Instance Method Details
#call ⇒ Object
21 22 23 |
# File 'app/models/renalware/hd/find_or_create_diary_by_week_query.rb', line 21 def call find_or_create_diary end |