Helper method for determining if an on_<configurable class>_<action>
        method is present, to be used as a hook in the add/update/remove
        configurable methods.
516758
def hook_for(self, configurable_class, action):
        
        configurable_class_name = configurable_class.__name__.lower()

        return getattr(
            self,
            "on_" + configurable_class_name + "_" + action,
            None
        )
1172391
def method_added(method_name)
      # do nothing if the method that was added was an actual hook method, or
      # if it already had hooks added to it
      return if hooks.include?(method_name) || hooked_methods.include?(method_name)
      add_hooks_to(method_name)
    end
390061
def method_missing(method, *args, &block)
      
      attribute = ActiveSupport::Inflector.camelize(method.to_s, false)
  
      if attribute =~ /=$/
        attribute = attribute.chop
        return super unless self.attributes.include?(attribute)
        self.changed_attributes[attribute] = args[0]
        self.attributes[attribute] = args[0]
      else
        return super unless self.attributes.include?(attribute)
        self.attributes[attribute]
      end 
            
    end
235437
def check_method(tab_ops, prefix, method_sym, do_call, *arguments, &block)
      method_sym = method_sym.id2name
      verb = :get
      [:post, :get, :delete, :put].each do |averb|
        if method_sym.start_with? averb.id2name
          verb = averb
          method_sym[averb.id2name + '_'] = ''
          break
        end
      end
      if tab_ops[verb].include? method_sym.to_sym
        if do_call
          params = arguments.first
          method = prefix + method_sym
          method += "/#{params.shift}"  if params.first && params.first.class != Hash
          return do_request verb, method, params.shift
        else
          return nil
        end
      end
      nil
    end
561740
public function canCached($action, $method_code = null) : bool {
		$method_code = $method_code ?? $this->method_code;
		if (!isset($this->cached_can_requests[$method_code][$action])) {
			$this->cached_can_requests[$method_code][$action] = $this->can($action, $method_code);
		}
		return $this->cached_can_requests[$method_code][$action];
	}
792491
function(a) {
		gui.Spirit.prototype.onaction.call(this, a);
		this.action.$handleownaction = false;
		switch (a.type) {
			case gui.$ACTION_XFRAME_VISIBILITY:
				this._waiting = false;
				if (gui.hasModule("gui-layout@wunderbyte.com")) { // TODO: - fix
					if (a.data === true) {
						this.visibility.on();
					} else {
						this.visibility.off();
					}
				}
				a.consume();
				break;
		}
	}
990750
static function isMethodDebugEnabled()
    {
        if ( !isset( $GLOBALS['eZTemplateDebugMethodEnabled'] ) )
        {
            $ini = eZINI::instance();
            $GLOBALS['eZTemplateDebugMethodEnabled'] = $ini->variable( 'TemplateSettings', 'ShowMethodDebug' ) == 'enabled';
        }
        return $GLOBALS['eZTemplateDebugMethodEnabled'];
    }
959502
public function setAction()
    {
        // Constructs the current action method
        $this->action = strtolower($this->action) . 'Action';

        // Checks if the current action method exists in the current controller
        if (!method_exists($this->controller, $this->action)) {

            // Attributes the default action method to the current action method
            $this->action = self::DEFAULT_ACTION;
        }
    }
469719
def _has_actions(self, event):
        """"""
        event_actions = self._aconfig.get(event)
        return event_actions is None or bool(event_actions)
1018644
def action_filter(method_name, *args, **kwargs):
    

    def action_filter(value, context, **_params):
        method = getattr(context["action"], method_name)
        return _filter(method, value, args, kwargs)

    return action_filter
273690
def _set_selected_action(self, action):
        """"""
        assert action in self._action_sets

        if self._selected_action is not None:
            raise ValueError("The action has already been selected.")
        self._selected_action = action
676631
function removeAction(action, ctrl) {
      if (this.actionExists(action, ctrl)) {
        this.removeActionIcon(action, ctrl);
        delete ctrl.actionListService.actionsToIndex[action.name];
        delete ctrl.actionListService.onToggle[action.name];
        var i = ctrl.actionListService.actionsToDisplay.indexOf(action.name);
        ctrl.actionListService.actionsToDisplay.splice(i, 1);
        i = ctrl.actionListService.requiredActionsList.indexOf(action.name);
        ctrl.actionListService.requiredActionsList.splice(i, 1);
      }
    }
318772
private static Method accessible(Method method) {
        if (method != null) {
            method.setAccessible(true);
        }
        return method;
    }
489619
def _get_handled_methods(self, actions_map):
        
        methods = ('OPTIONS',)

        defined_actions = []
        for action_name in actions_map.keys():
            view_method = getattr(self, action_name, None)
            method_exists = view_method is not None
            method_defined = view_method != self.not_allowed_action
            if method_exists and method_defined:
                defined_actions.append(action_name)

        for action in defined_actions:
            methods += actions_map[action]

        return methods
69650
def define_instance_action(action, &block)
      body = block_given? ? block : InstanceTemplateMethods.instance_method(action)
      define_method(action, body)
    end
1196475
def define_action_hook
      action_hook = self.action_hook
      action = self.action
      private_action_hook = owner_class.private_method_defined?(action_hook)

      # Only define helper if it hasn't
      define_helper :instance, <<-end_eval, __FILE__, __LINE__ + 1
          def #{action_hook}(*)
            self.class.state_machines.transitions(self, #{action.inspect}).perform { super }
          end
          
          private #{action_hook.inspect} if #{private_action_hook}
      end_eval
    end
798807
def _checkAction(self, action, value):
        '''
        '''
        if action is None:
            raise WSActionException, 'Response missing WSAddress Action'
        if not value:
            raise WSActionException, 'missing WSAddress Action, expecting %s' %action
        if value != action:
            raise WSActionException, 'wrong WSAddress Action(%s), expecting %s'%(value,action)