class Voom::Presenters::DSL::Components::Actions::Loads
Public Class Methods
new(**attribs_, &block)
click to toggle source
Calls superclass method
Voom::Presenters::DSL::Components::Actions::Base::new
# 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
Public Instance Methods
url()
click to toggle source
# File lib/voom/presenters/dsl/components/actions/loads.rb, line 16 def url @parent.router.url(render: parse_presenter, command: options[:path], context: params, host: @host) end
Private Instance Methods
parse_presenter()
click to toggle source
# File lib/voom/presenters/dsl/components/actions/loads.rb, line 22 def parse_presenter return options[:presenter] if options[:presenter].match(/^https?\:\/\//) _expand_namespace_(options[:presenter], namespace).gsub(':', '/') end