Module: Wallaby::View::ActionViewable::ClassMethods

Defined in:
lib/wallaby/view/action_viewable.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#prefix_optionsHash

It stores the options for #_prefixes. It can inherit options from superclass.

Returns:

  • (Hash)

    prefix options



17
18
19
# File 'lib/wallaby/view/action_viewable.rb', line 17

def prefix_options
  @prefix_options ||= superclass.try(:prefix_options).try(:dup) || {}
end

Instance Method Details

#merge_prefix_options(new_options) ⇒ Hash

Add prefix options

Parameters:

  • new_options (Hash)

Returns:

  • (Hash)

    merged prefix options



24
25
26
# File 'lib/wallaby/view/action_viewable.rb', line 24

def merge_prefix_options(new_options)
  prefix_options.merge!(new_options)
end