Class: TeamsIncomingClients::Dates::DateClient

Inherits:
Object
  • Object
show all
Includes:
Policies
Defined in:
lib/teams_incoming_clients/models/dates/date_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_dayObject (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

Returns:

  • (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

Returns:

  • (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

Returns:

  • (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