Class: Voom::Presenters::DSL::Components::HiddenField
- Defined in:
- lib/voom/presenters/dsl/components/hidden_field.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Input
Attributes inherited from EventBase
Attributes included from Mixins::Event
Attributes inherited from Base
#attributes, #css_class, #draggable, #drop_zone, #id, #tag, #type
Instance Method Summary collapse
-
#initialize(**attribs_, &block) ⇒ HiddenField
constructor
A new instance of HiddenField.
- #value(value = nil) ⇒ Object
Methods inherited from Input
Methods included from Mixins::Tooltips
Methods included from Mixins::Event
Methods inherited from Base
Methods included from Pluggable
#include_plugins, #plugin, #plugin_module
Methods included from Mixins::YieldTo
Methods included from Serializer
Methods included from Lockable
Constructor Details
#initialize(**attribs_, &block) ⇒ HiddenField
Returns a new instance of HiddenField.
8 9 10 11 12 |
# File 'lib/voom/presenters/dsl/components/hidden_field.rb', line 8 def initialize(**attribs_, &block) super(type: :hidden_field, **attribs_, &block) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/voom/presenters/dsl/components/hidden_field.rb', line 6 def name @name end |
Instance Method Details
#value(value = nil) ⇒ Object
14 15 16 17 |
# File 'lib/voom/presenters/dsl/components/hidden_field.rb', line 14 def value(value=nil) return @value if locked? @value = value end |