Class: HakumiComponents::Calendar::DayCell

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
app/components/hakumi_components/calendar/day_cell.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(date:, day:, in_month:, today:, selected:, disabled:, weekend:) ⇒ DayCell

Returns a new instance of DayCell.



20
21
22
23
24
25
26
27
28
# File 'app/components/hakumi_components/calendar/day_cell.rb', line 20

def initialize(date:, day:, in_month:, today:, selected:, disabled:, weekend:)
  @date = T.let(date, Date)
  @day = T.let(day, Integer)
  @in_month = T.let(in_month, T::Boolean)
  @today = T.let(today, T::Boolean)
  @selected = T.let(selected, T::Boolean)
  @disabled = T.let(disabled, T::Boolean)
  @weekend = T.let(weekend, T::Boolean)
end

Instance Attribute Details

#dateObject (readonly)

Returns the value of attribute date.



31
32
33
# File 'app/components/hakumi_components/calendar/day_cell.rb', line 31

def date
  @date
end

#dayObject (readonly)

Returns the value of attribute day.



34
35
36
# File 'app/components/hakumi_components/calendar/day_cell.rb', line 34

def day
  @day
end

Instance Method Details

#disabled?Boolean

Returns:

  • (Boolean)


52
53
54
# File 'app/components/hakumi_components/calendar/day_cell.rb', line 52

def disabled?
  @disabled
end

#in_month?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'app/components/hakumi_components/calendar/day_cell.rb', line 37

def in_month?
  @in_month
end

#selected?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'app/components/hakumi_components/calendar/day_cell.rb', line 47

def selected?
  @selected
end

#today?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'app/components/hakumi_components/calendar/day_cell.rb', line 42

def today?
  @today
end

#weekend?Boolean

Returns:

  • (Boolean)


57
58
59
# File 'app/components/hakumi_components/calendar/day_cell.rb', line 57

def weekend?
  @weekend
end