Class: FlowEngine::Introduction

Inherits:
Data
  • Object
show all
Defined in:
lib/flowengine/introduction.rb

Overview

Immutable introduction configuration for a flow. When present in a Definition, indicates the UI should collect free-form text before the first step. The label is shown above the input field; the placeholder appears inside it. maxlength limits the character count of the free-form text (nil = unlimited).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(label:, placeholder: "", maxlength: nil) ⇒ Introduction

Returns a new instance of Introduction.



9
10
11
12
# File 'lib/flowengine/introduction.rb', line 9

def initialize(label:, placeholder: "", maxlength: nil)
  super
  freeze
end

Instance Attribute Details

#label ⇒ Object (readonly)

Returns the value of attribute label

Returns:

  • (Object) —

    the current value of label



8
9
10
# File 'lib/flowengine/introduction.rb', line 8

def label
  @label
end

#maxlength ⇒ Object (readonly)

Returns the value of attribute maxlength

Returns:

  • (Object) —

    the current value of maxlength



8
9
10
# File 'lib/flowengine/introduction.rb', line 8

def maxlength
  @maxlength
end

#placeholder ⇒ Object (readonly)

Returns the value of attribute placeholder

Returns:

  • (Object) —

    the current value of placeholder



8
9
10
# File 'lib/flowengine/introduction.rb', line 8

def placeholder
  @placeholder
end