Class: Voom::Presenters::DSL::Components::Stepper
- Defined in:
- lib/voom/presenters/dsl/components/stepper.rb
Defined Under Namespace
Classes: Step
Constant Summary collapse
- VALID_ORIENTATIONS =
[:vertical, :horizontal]
Instance Attribute Summary collapse
-
#linear ⇒ Object
readonly
Returns the value of attribute linear.
-
#orientation ⇒ Object
readonly
Returns the value of attribute orientation.
-
#steps ⇒ Object
readonly
Returns the value of attribute steps.
Attributes inherited from Base
#attributes, #css_class, #draggable, #drop_zone, #id, #tag, #type
Instance Method Summary collapse
-
#initialize(**attribs_, &block) ⇒ Stepper
constructor
A new instance of Stepper.
- #step(text = nil, **attribs, &block) ⇒ Object
Methods inherited from Base
Methods included from Pluggable
#include_plugins, #plugin, #plugin_module
Methods included from Mixins::YieldTo
Methods included from Serializer
Methods included from Lockable
Constructor Details
#initialize(**attribs_, &block) ⇒ Stepper
Returns a new instance of Stepper.
9 10 11 12 13 14 15 16 |
# File 'lib/voom/presenters/dsl/components/stepper.rb', line 9 def initialize(**attribs_, &block) super(type: :stepper, **attribs_, &block) @orientation = attribs.delete(:orientation) {:horizontal} raise_parameter_validation "Invalid Orientation Type specified: #{orientation}" unless VALID_ORIENTATIONS.include? orientation @linear = attribs.delete(:linear) {true} @steps = [] end |
Instance Attribute Details
#linear ⇒ Object (readonly)
Returns the value of attribute linear.
6 7 8 |
# File 'lib/voom/presenters/dsl/components/stepper.rb', line 6 def linear @linear end |
#orientation ⇒ Object (readonly)
Returns the value of attribute orientation.
6 7 8 |
# File 'lib/voom/presenters/dsl/components/stepper.rb', line 6 def orientation @orientation end |
#steps ⇒ Object (readonly)
Returns the value of attribute steps.
6 7 8 |
# File 'lib/voom/presenters/dsl/components/stepper.rb', line 6 def steps @steps end |