Method: Github::API#api_methods_in

Defined in:
lib/github_api2/api/actions.rb

#api_methods_in(klass) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Finds api methods in a class

Parameters:

  • klass (Class)

    The klass to inspect for methods.



32
33
34
35
36
37
38
39
40
41
# File 'lib/github_api2/api/actions.rb', line 32

def api_methods_in(klass)
  methods = klass.send(:instance_methods, false) - [:actions]
  methods.sort.each_with_object([]) do |method_name, accumulator|
    unless method_name.to_s.include?('with') ||
           method_name.to_s.include?('without')
      accumulator << method_name
    end
    accumulator
  end
end