class Voom::Presenters::DSL::Components::Stepper
Constants
- VALID_ORIENTATIONS
Attributes
linear[R]
orientation[R]
steps[R]
Public Class Methods
new(**attribs_, &block)
click to toggle source
Calls superclass method
Voom::Presenters::DSL::Components::Base::new
# 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 = [] expand! end
Public Instance Methods
step(text = nil, **attribs, &block)
click to toggle source
# File lib/voom/presenters/dsl/components/stepper.rb, line 18 def step(text = nil, **attribs, &block) @steps << Step.new(parent: self, text: text, **attribs, &block) end