Method: ActionCable::Channel::Base.action_methods
- Defined in:
- lib/action_cable/channel/base.rb
.action_methods ⇒ Object
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.
129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/action_cable/channel/base.rb', line 129 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 |