Class: Attend::GetAbsentDays
- Inherits:
-
Object
- Object
- Attend::GetAbsentDays
- Defined in:
- lib/attend/get_absent_days.rb
Instance Attribute Summary collapse
-
#zoho ⇒ Object
readonly
Returns the value of attribute zoho.
Instance Method Summary collapse
- #call(email:, from:, to:) ⇒ Object
-
#initialize(zoho:) ⇒ GetAbsentDays
constructor
A new instance of GetAbsentDays.
Constructor Details
#initialize(zoho:) ⇒ GetAbsentDays
Returns a new instance of GetAbsentDays.
7 8 9 |
# File 'lib/attend/get_absent_days.rb', line 7 def initialize(zoho:) @zoho = zoho end |
Instance Attribute Details
#zoho ⇒ Object (readonly)
Returns the value of attribute zoho.
5 6 7 |
# File 'lib/attend/get_absent_days.rb', line 5 def zoho @zoho end |
Instance Method Details
#call(email:, from:, to:) ⇒ Object
11 12 13 14 15 |
# File 'lib/attend/get_absent_days.rb', line 11 def call(email:, from:, to:) attendance_report = zoho.get_attendance_report(email: email, from: from, to: to) attendance_report.records.select(&:missing_work?).map(&:date) end |