Module: Core::Endpoint::BasicHandler::Actions::Standard

Included in:
Core::Endpoint::BasicHandler
Defined in:
app/api/core/endpoint/basic_handler/actions/standard.rb

Defined Under Namespace

Modules: InstanceMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(base) ⇒ Object



3
4
5
6
7
8
9
10
# File 'app/api/core/endpoint/basic_handler/actions/standard.rb', line 3

def self.extended(base)
  base.class_eval do
    include InstanceMethods

    class_attribute :standard_actions, instance_writer: false
    self.standard_actions = {}
  end
end

Instance Method Details

#standard_action(*names) ⇒ Object



12
13
14
15
# File 'app/api/core/endpoint/basic_handler/actions/standard.rb', line 12

def standard_action(*names)
  self.standard_actions = {} if standard_actions.empty?
  standard_actions.merge!(names.to_h { |a| [a.to_sym, a.to_sym] })
end