Class: StimulusPlumbers::Components::Calendar::Turbo::DaysOfWeek

Inherits:
Plumber::Base
  • Object
show all
Defined in:
lib/stimulus_plumbers/components/calendar/turbo/days_of_week.rb

Constant Summary collapse

WEEKDAY_FORMATS =
%i[narrow short long].freeze

Instance Attribute Summary collapse

Attributes inherited from Plumber::Base

#template

Instance Method Summary collapse

Methods inherited from Plumber::Base

#theme

Methods included from Plumber::Renderer

#set_slots, #slot_block_for, #slot_kwargs_for, #slot_renderable?

Methods included from Plumber::Options::Aria

#labelled_aria

Methods included from Plumber::Options::Html

#merge_html_options

Constructor Details

#initialize(template, format: :short) ⇒ DaysOfWeek

Returns a new instance of DaysOfWeek.



12
13
14
15
# File 'lib/stimulus_plumbers/components/calendar/turbo/days_of_week.rb', line 12

def initialize(template, format: :short)
  super(template)
  @format = format
end

Instance Attribute Details

#formatObject (readonly)

Returns the value of attribute format.



10
11
12
# File 'lib/stimulus_plumbers/components/calendar/turbo/days_of_week.rb', line 10

def format
  @format
end

Instance Method Details

#renderObject



17
18
19
# File 'lib/stimulus_plumbers/components/calendar/turbo/days_of_week.rb', line 17

def render(...)
  render_days_of_week(...)
end