Class: Archsight::Web::Editor::FormBuilder::Field
- Inherits:
-
Struct
- Object
- Struct
- Archsight::Web::Editor::FormBuilder::Field
- Defined in:
- lib/archsight/web/editor/form_builder.rb
Overview
Field represents a single form field configuration
Instance Attribute Summary collapse
-
#code_language ⇒ Object
Returns the value of attribute code_language.
-
#description ⇒ Object
Returns the value of attribute description.
-
#input_type ⇒ Object
Returns the value of attribute input_type.
-
#key ⇒ Object
Returns the value of attribute key.
-
#options ⇒ Object
Returns the value of attribute options.
-
#required ⇒ Object
Returns the value of attribute required.
-
#step ⇒ Object
Returns the value of attribute step.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
- #code? ⇒ Boolean
- #list? ⇒ Boolean
- #markdown? ⇒ Boolean
- #number? ⇒ Boolean
- #select? ⇒ Boolean
- #text? ⇒ Boolean
- #textarea? ⇒ Boolean
- #url? ⇒ Boolean
Instance Attribute Details
#code_language ⇒ Object
Returns the value of attribute code_language
11 12 13 |
# File 'lib/archsight/web/editor/form_builder.rb', line 11 def code_language @code_language end |
#description ⇒ Object
Returns the value of attribute description
11 12 13 |
# File 'lib/archsight/web/editor/form_builder.rb', line 11 def description @description end |
#input_type ⇒ Object
Returns the value of attribute input_type
11 12 13 |
# File 'lib/archsight/web/editor/form_builder.rb', line 11 def input_type @input_type end |
#key ⇒ Object
Returns the value of attribute key
11 12 13 |
# File 'lib/archsight/web/editor/form_builder.rb', line 11 def key @key end |
#options ⇒ Object
Returns the value of attribute options
11 12 13 |
# File 'lib/archsight/web/editor/form_builder.rb', line 11 def @options end |
#required ⇒ Object
Returns the value of attribute required
11 12 13 |
# File 'lib/archsight/web/editor/form_builder.rb', line 11 def required @required end |
#step ⇒ Object
Returns the value of attribute step
11 12 13 |
# File 'lib/archsight/web/editor/form_builder.rb', line 11 def step @step end |
#title ⇒ Object
Returns the value of attribute title
11 12 13 |
# File 'lib/archsight/web/editor/form_builder.rb', line 11 def title @title end |
Instance Method Details
#code? ⇒ Boolean
24 25 26 |
# File 'lib/archsight/web/editor/form_builder.rb', line 24 def code? input_type == :code end |
#list? ⇒ Boolean
40 41 42 |
# File 'lib/archsight/web/editor/form_builder.rb', line 40 def list? input_type == :list end |
#markdown? ⇒ Boolean
20 21 22 |
# File 'lib/archsight/web/editor/form_builder.rb', line 20 def markdown? input_type == :markdown end |
#number? ⇒ Boolean
28 29 30 |
# File 'lib/archsight/web/editor/form_builder.rb', line 28 def number? input_type == :number end |
#select? ⇒ Boolean
12 13 14 |
# File 'lib/archsight/web/editor/form_builder.rb', line 12 def select? input_type == :select end |
#text? ⇒ Boolean
36 37 38 |
# File 'lib/archsight/web/editor/form_builder.rb', line 36 def text? input_type == :text end |
#textarea? ⇒ Boolean
16 17 18 |
# File 'lib/archsight/web/editor/form_builder.rb', line 16 def textarea? %i[textarea markdown].include?(input_type) end |
#url? ⇒ Boolean
32 33 34 |
# File 'lib/archsight/web/editor/form_builder.rb', line 32 def url? input_type == :url end |