rails/daylight/api_controller.rb
##
# Turns on common actions based on subclass needs (sets them as public methods).
# Uses whitelist of allowed actions to be handled.
#
# See:
# API_ACTIONS
#--
# `public` is called in context of the subclass
Turns on common actions based on subclass needs (sets them as public methods).
Uses whitelist of allowed actions to be handled.



`public` is called in context of the subclass
Turns on common actions based on subclass needs ( sets them as public methods ) . Uses whitelist of allowed actions to be handled . ` public ` is called in context of the subclass
def handles *actions
        actions = API_ACTIONS.dup if actions.any? {|a| a == :all }
        whitelisted = actions.map(&:to_sym) & API_ACTIONS
        if (unhandled = actions - whitelisted).present?
          logger.warn "Daylight::APIController isn't handling unwhitelisted actions"
          logger.warn "\tspecified in #{self.name}#handles: #{unhandled.join(',')}"
        end
        public(*whitelisted) if whitelisted.present?
      end
def handles * actions actions = API_ACTIONS . dup if actions . any? { | a | a == :all } whitelisted = actions . map ( & :to_sym ) & API_ACTIONS if ( unhandled = actions - whitelisted ) . present? logger . warn "Daylight::APIController isn't handling unwhitelisted actions" logger . warn "\tspecified in #{self.name}#handles: #{unhandled.join(',')}" end public ( * whitelisted ) if whitelisted . present? end
Turns on common actions based on subclass needs (sets them as public methods).
Turns on common actions based on subclass needs ( sets them as public methods ) .
actions
<not_specific>