class method
self.action_methods
Ruby on Rails 7.1.6
Since v5.2.8.1Signature
self.action_methods()
A list of method names that should be considered actions. This includes all public instance methods on a channel, less any internal methods (defined on Base), adding back in any methods that are internal, but still exist on the class itself.
Returns
-
Set- A set of all methods that should be considered actions.
Source
# File actioncable/lib/action_cable/channel/base.rb, line 120
def action_methods
@action_methods ||= begin
# All public instance methods of this class, including ancestors
methods = (public_instance_methods(true) -
# Except for public instance methods of Base and its ancestors
ActionCable::Channel::Base.public_instance_methods(true) +
# Be sure to include shadowed public instance methods of this class
public_instance_methods(false)).uniq.map(&:to_s)
methods.to_set
end
end
Defined in actioncable/lib/action_cable/channel/base.rb line 120
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionCable::Channel::Base