Class: Voom::Presenters::DSL::Components::NumberField
Constant Summary
Constants inherited from TextField
Instance Attribute Summary collapse
-
#max ⇒ Object
readonly
Returns the value of attribute max.
-
#min ⇒ Object
readonly
Returns the value of attribute min.
-
#readonly ⇒ Object
readonly
Returns the value of attribute readonly.
-
#step ⇒ Object
readonly
Returns the value of attribute step.
Attributes inherited from TextField
#auto_complete, #behavior, #case_type, #full_width, #required
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) ⇒ NumberField
constructor
A new instance of NumberField.
Methods inherited from TextField
#hint, #icon, #label, #pattern, #value
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) ⇒ NumberField
Returns a new instance of NumberField.
8 9 10 11 12 13 14 15 |
# File 'lib/voom/presenters/dsl/components/number_field.rb', line 8 def initialize(**attribs_, &block) super(type: :number_field, **attribs_, &block) @min = attribs.delete(:min) @max = attribs.delete(:max) @step = attribs.delete(:step) @readonly = attribs.delete(:readonly){false} end |
Instance Attribute Details
#max ⇒ Object (readonly)
Returns the value of attribute max.
6 7 8 |
# File 'lib/voom/presenters/dsl/components/number_field.rb', line 6 def max @max end |
#min ⇒ Object (readonly)
Returns the value of attribute min.
6 7 8 |
# File 'lib/voom/presenters/dsl/components/number_field.rb', line 6 def min @min end |
#readonly ⇒ Object (readonly)
Returns the value of attribute readonly.
6 7 8 |
# File 'lib/voom/presenters/dsl/components/number_field.rb', line 6 def readonly @readonly end |
#step ⇒ Object (readonly)
Returns the value of attribute step.
6 7 8 |
# File 'lib/voom/presenters/dsl/components/number_field.rb', line 6 def step @step end |