Class: HakumiComponents::Calendar::PanelEntry

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#labelObject (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

#valueObject (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

Returns:

  • (Boolean)


33
34
35
# File 'app/components/hakumi_components/calendar/panel_entry.rb', line 33

def current?
  @current
end

#enabled?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'app/components/hakumi_components/calendar/panel_entry.rb', line 43

def enabled?
  @enabled
end

#selected?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'app/components/hakumi_components/calendar/panel_entry.rb', line 38

def selected?
  @selected
end