Class: HakumiComponents::Calendar::PanelEntry
- Inherits:
-
Object
- Object
- HakumiComponents::Calendar::PanelEntry
- Extended by:
- T::Sig
- Defined in:
- app/components/hakumi_components/calendar/panel_entry.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #current? ⇒ Boolean
- #enabled? ⇒ Boolean
-
#initialize(value:, label:, current:, selected:, enabled: true) ⇒ PanelEntry
constructor
A new instance of PanelEntry.
- #selected? ⇒ Boolean
Constructor Details
#initialize(value:, label:, current:, selected:, enabled: true) ⇒ PanelEntry
Returns a new instance of PanelEntry.
18 19 20 21 22 23 24 |
# File 'app/components/hakumi_components/calendar/panel_entry.rb', line 18 def initialize(value:, label:, current:, selected:, enabled: true) @value = T.let(value, Integer) @label = T.let(label, String) @current = T.let(current, T::Boolean) @selected = T.let(selected, T::Boolean) @enabled = T.let(enabled, T::Boolean) end |
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
30 31 32 |
# File 'app/components/hakumi_components/calendar/panel_entry.rb', line 30 def label @label end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
27 28 29 |
# File 'app/components/hakumi_components/calendar/panel_entry.rb', line 27 def value @value end |
Instance Method Details
#current? ⇒ Boolean
33 34 35 |
# File 'app/components/hakumi_components/calendar/panel_entry.rb', line 33 def current? @current end |
#enabled? ⇒ Boolean
43 44 45 |
# File 'app/components/hakumi_components/calendar/panel_entry.rb', line 43 def enabled? @enabled end |
#selected? ⇒ Boolean
38 39 40 |
# File 'app/components/hakumi_components/calendar/panel_entry.rb', line 38 def selected? @selected end |