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


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

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


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

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