Class: Glib::FormStepper::Step

Inherits:
Data
  • Object
show all
Defined in:
app/controllers/concerns/glib/form_stepper/step.rb

Overview

One step in a session-backed wizard: just its identity and label. key is coerced to a symbol so a step declared with either a symbol or string, and a params[:id] that always arrives as a string, resolve to the same step.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, title:, position:) ⇒ Step

Returns a new instance of Step.



7
8
9
# File 'app/controllers/concerns/glib/form_stepper/step.rb', line 7

def initialize(key:, title:, position:)
  super(key: key.to_sym, title: title, position: position)
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



6
7
8
# File 'app/controllers/concerns/glib/form_stepper/step.rb', line 6

def key
  @key
end

#positionObject (readonly)

Returns the value of attribute position

Returns:

  • (Object)

    the current value of position



6
7
8
# File 'app/controllers/concerns/glib/form_stepper/step.rb', line 6

def position
  @position
end

#titleObject (readonly)

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



6
7
8
# File 'app/controllers/concerns/glib/form_stepper/step.rb', line 6

def title
  @title
end