Class: Wizardry::Questions::Hidden
- Defined in:
- lib/wizardry/questions/hidden.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #extra_kwargs ⇒ Object
- #form_method ⇒ Object
-
#initialize(name, value) ⇒ Hidden
constructor
A new instance of Hidden.
Methods inherited from Answer
Constructor Details
#initialize(name, value) ⇒ Hidden
Returns a new instance of Hidden.
6 7 8 9 10 11 |
# File 'lib/wizardry/questions/hidden.rb', line 6 def initialize(name, value) Rails.logger.debug("🧙 Adding hidden field '#{name}'") @value = value super(name) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/wizardry/questions/hidden.rb', line 4 def name @name end |
Instance Method Details
#extra_kwargs ⇒ Object
17 18 19 |
# File 'lib/wizardry/questions/hidden.rb', line 17 def extra_kwargs { value: @value } end |
#form_method ⇒ Object
13 14 15 |
# File 'lib/wizardry/questions/hidden.rb', line 13 def form_method :hidden_field end |