Class: HakumiComponents::Calendar::DayCell
- Inherits:
-
Object
- Object
- HakumiComponents::Calendar::DayCell
- Extended by:
- T::Sig
- Defined in:
- app/components/hakumi_components/calendar/day_cell.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#day ⇒ Object
readonly
Returns the value of attribute day.
Instance Method Summary collapse
- #disabled? ⇒ Boolean
- #in_month? ⇒ Boolean
-
#initialize(date:, day:, in_month:, today:, selected:, disabled:, weekend:) ⇒ DayCell
constructor
A new instance of DayCell.
- #selected? ⇒ Boolean
- #today? ⇒ Boolean
- #weekend? ⇒ Boolean
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
#date ⇒ Object (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 |
#day ⇒ Object (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
52 53 54 |
# File 'app/components/hakumi_components/calendar/day_cell.rb', line 52 def disabled? @disabled end |
#in_month? ⇒ Boolean
37 38 39 |
# File 'app/components/hakumi_components/calendar/day_cell.rb', line 37 def in_month? @in_month end |
#selected? ⇒ Boolean
47 48 49 |
# File 'app/components/hakumi_components/calendar/day_cell.rb', line 47 def selected? @selected end |
#today? ⇒ Boolean
42 43 44 |
# File 'app/components/hakumi_components/calendar/day_cell.rb', line 42 def today? @today end |
#weekend? ⇒ Boolean
57 58 59 |
# File 'app/components/hakumi_components/calendar/day_cell.rb', line 57 def weekend? @weekend end |