Class: TeamsIncomingClients::Dates::DateClient
- Inherits:
-
Object
- Object
- TeamsIncomingClients::Dates::DateClient
- Includes:
- Policies
- Defined in:
- lib/teams_incoming_clients/models/dates/date_client.rb
Instance Attribute Summary collapse
-
#target_day ⇒ Object
readonly
Returns the value of attribute target_day.
Instance Method Summary collapse
- #holiday_date? ⇒ Boolean
-
#initialize(target_date) ⇒ DateClient
constructor
A new instance of DateClient.
- #today_match_day?(day_num) ⇒ Boolean
- #week_of_day?(week_of_day) ⇒ Boolean
Constructor Details
#initialize(target_date) ⇒ DateClient
Returns a new instance of DateClient.
9 10 11 12 |
# File 'lib/teams_incoming_clients/models/dates/date_client.rb', line 9 def initialize(target_date) @target_day = target_date @policy = DatePolicy.new(target_date) end |
Instance Attribute Details
#target_day ⇒ Object (readonly)
Returns the value of attribute target_day.
7 8 9 |
# File 'lib/teams_incoming_clients/models/dates/date_client.rb', line 7 def target_day @target_day end |
Instance Method Details
#holiday_date? ⇒ Boolean
14 15 16 |
# File 'lib/teams_incoming_clients/models/dates/date_client.rb', line 14 def holiday_date? policy.holiday_date? end |
#today_match_day?(day_num) ⇒ Boolean
22 23 24 |
# File 'lib/teams_incoming_clients/models/dates/date_client.rb', line 22 def today_match_day?(day_num) policy.today_match_day?(day_num) end |
#week_of_day?(week_of_day) ⇒ Boolean
18 19 20 |
# File 'lib/teams_incoming_clients/models/dates/date_client.rb', line 18 def week_of_day?(week_of_day) policy.week_of_day?(week_of_day) end |