Class: StimulusPlumbers::Components::Calendar::Turbo::YearsOfDecade
- Inherits:
-
Plumber::Base
- Object
- Plumber::Base
- StimulusPlumbers::Components::Calendar::Turbo::YearsOfDecade
- Defined in:
- lib/stimulus_plumbers/components/calendar/turbo/years_of_decade.rb
Constant Summary collapse
- YEARS_PER_ROW =
4- DECADE_SIZE =
10
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#disabled_years ⇒ Object
readonly
Returns the value of attribute disabled_years.
-
#selected_date ⇒ Object
readonly
Returns the value of attribute selected_date.
-
#since ⇒ Object
readonly
Returns the value of attribute since.
-
#till ⇒ Object
readonly
Returns the value of attribute till.
-
#today ⇒ Object
readonly
Returns the value of attribute today.
Attributes inherited from Plumber::Base
Instance Method Summary collapse
-
#initialize(template, date: Date.today, today: Date.today, selected_date: nil, since: nil, till: nil, disabled_years: []) ⇒ YearsOfDecade
constructor
A new instance of YearsOfDecade.
- #render ⇒ Object
Methods inherited from Plumber::Base
Methods included from Plumber::Renderer
#set_slots, #slot_block_for, #slot_kwargs_for, #slot_renderable?
Methods included from Plumber::Options::Aria
Methods included from Plumber::Options::Html
Constructor Details
#initialize(template, date: Date.today, today: Date.today, selected_date: nil, since: nil, till: nil, disabled_years: []) ⇒ YearsOfDecade
Returns a new instance of YearsOfDecade.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/stimulus_plumbers/components/calendar/turbo/years_of_decade.rb', line 13 def initialize( template, date: Date.today, today: Date.today, selected_date: nil, since: nil, till: nil, disabled_years: [] ) super(template) @date = date @today = today @selected_date = selected_date @since = since @till = till @disabled_years = disabled_years end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
11 12 13 |
# File 'lib/stimulus_plumbers/components/calendar/turbo/years_of_decade.rb', line 11 def date @date end |
#disabled_years ⇒ Object (readonly)
Returns the value of attribute disabled_years.
11 12 13 |
# File 'lib/stimulus_plumbers/components/calendar/turbo/years_of_decade.rb', line 11 def disabled_years @disabled_years end |
#selected_date ⇒ Object (readonly)
Returns the value of attribute selected_date.
11 12 13 |
# File 'lib/stimulus_plumbers/components/calendar/turbo/years_of_decade.rb', line 11 def selected_date @selected_date end |
#since ⇒ Object (readonly)
Returns the value of attribute since.
11 12 13 |
# File 'lib/stimulus_plumbers/components/calendar/turbo/years_of_decade.rb', line 11 def since @since end |
#till ⇒ Object (readonly)
Returns the value of attribute till.
11 12 13 |
# File 'lib/stimulus_plumbers/components/calendar/turbo/years_of_decade.rb', line 11 def till @till end |
#today ⇒ Object (readonly)
Returns the value of attribute today.
11 12 13 |
# File 'lib/stimulus_plumbers/components/calendar/turbo/years_of_decade.rb', line 11 def today @today end |
Instance Method Details
#render ⇒ Object
31 32 33 |
# File 'lib/stimulus_plumbers/components/calendar/turbo/years_of_decade.rb', line 31 def render(...) render_years_of_decade(...) end |