Class: Voom::Presenters::DSL::Components::Stepper::Step::Actions

Inherits:
Base
  • Object
show all
Defined in:
lib/voom/presenters/dsl/components/stepper.rb

Defined Under Namespace

Classes: StepperButton

Instance Attribute Summary collapse

Attributes inherited from Base

#attributes, #css_class, #draggable, #drop_zone, #id, #tag, #type

Instance Method Summary collapse

Methods inherited from Base

#expand!

Methods included from Pluggable

#include_plugins, #plugin, #plugin_module

Methods included from Mixins::YieldTo

#yield_to

Methods included from Serializer

#to_hash

Methods included from Lockable

#locked?

Constructor Details

#initialize(**attribs_, &block) ⇒ Actions

Returns a new instance of Actions.



48
49
50
51
52
# File 'lib/voom/presenters/dsl/components/stepper.rb', line 48

def initialize(**attribs_, &block)
  super(type: :action, **attribs_, &block)
  @buttons = []
  expand!
end

Instance Attribute Details

#buttonsObject

Returns the value of attribute buttons.



46
47
48
# File 'lib/voom/presenters/dsl/components/stepper.rb', line 46

def buttons
  @buttons
end

Instance Method Details

#back(text = 'Back', **options, &block) ⇒ Object



59
60
61
# File 'lib/voom/presenters/dsl/components/stepper.rb', line 59

def back(text = 'Back', **options, &block)
  button(text, :back, **options, &block)
end

#cancel(text = 'Cancel', **options, &block) ⇒ Object



67
68
69
# File 'lib/voom/presenters/dsl/components/stepper.rb', line 67

def cancel(text = 'Cancel', **options, &block)
  button(text,:cancel, **options, &block)
end

#continue(text = 'Continue', **options, &block) ⇒ Object Also known as: next



54
55
56
# File 'lib/voom/presenters/dsl/components/stepper.rb', line 54

def continue(text = 'Continue', **options, &block)
  button(text, :next, **options, &block)
end

#skip(text = 'Skip', **options, &block) ⇒ Object



63
64
65
# File 'lib/voom/presenters/dsl/components/stepper.rb', line 63

def skip(text = 'Skip', **options, &block)
  button(text,:skip, **options, &block)
end