Class: Voom::Presenters::DSL::Components::Actions::Loads
- Includes:
- Namespace
- Defined in:
- lib/voom/presenters/dsl/components/actions/loads.rb
Instance Attribute Summary
Attributes inherited from Base
#dynamic_params, #options, #params
Attributes inherited from Base
#attributes, #css_class, #draggable, #drop_zone, #id, #tag, #type
Instance Method Summary collapse
-
#initialize(**attribs_, &block) ⇒ Loads
constructor
A new instance of Loads.
- #url ⇒ Object
Methods included from Namespace
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) ⇒ Loads
Returns a new instance of Loads.
9 10 11 12 13 14 |
# File 'lib/voom/presenters/dsl/components/actions/loads.rb', line 9 def initialize(**attribs_, &block) super(type: :loads, **attribs_, &block) option_value = attribs.delete(:wait_for_download){:not_found} @options.merge!(wait_for_download: option_value) unless option_value==:not_found @host = @params.fetch(:host, false) end |
Instance Method Details
#url ⇒ Object
16 17 18 |
# File 'lib/voom/presenters/dsl/components/actions/loads.rb', line 16 def url @parent.router.url(render: parse_presenter, command: [:path], context: params, host: @host) end |