Class: Voom::Presenters::DSL::Components::FileInput
- Includes:
- Mixins::Append, Mixins::Buttons, Mixins::Grids
- Defined in:
- lib/voom/presenters/dsl/components/file_input.rb
Instance Attribute Summary collapse
-
#accept ⇒ Object
readonly
Returns the value of attribute accept.
-
#components ⇒ Object
readonly
Returns the value of attribute components.
-
#preview ⇒ Object
readonly
Returns the value of attribute preview.
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) ⇒ FileInput
constructor
A new instance of FileInput.
- #value(value = nil) ⇒ Object
Methods included from Mixins::Grids
Methods included from Mixins::Buttons
Methods included from Mixins::Append
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) ⇒ FileInput
Returns a new instance of FileInput.
12 13 14 15 16 17 18 19 20 |
# File 'lib/voom/presenters/dsl/components/file_input.rb', line 12 def initialize(**attribs_, &block) super(type: :file_input, **attribs_, &block) @accept = attribs.delete(:accept) { nil } @preview = attribs.delete(:preview) { nil } @components = [] end |
Instance Attribute Details
#accept ⇒ Object (readonly)
Returns the value of attribute accept.
10 11 12 |
# File 'lib/voom/presenters/dsl/components/file_input.rb', line 10 def accept @accept end |
#components ⇒ Object (readonly)
Returns the value of attribute components.
10 11 12 |
# File 'lib/voom/presenters/dsl/components/file_input.rb', line 10 def components @components end |
#preview ⇒ Object (readonly)
Returns the value of attribute preview.
10 11 12 |
# File 'lib/voom/presenters/dsl/components/file_input.rb', line 10 def preview @preview end |
Instance Method Details
#value(value = nil) ⇒ Object
22 23 24 25 |
# File 'lib/voom/presenters/dsl/components/file_input.rb', line 22 def value(value=nil) return @value if locked? @value = value end |