Class: Cathode::Debug

Inherits:
Object
  • Object
show all
Defined in:
lib/cathode/debug.rb

Overview

Provides information about the Cathode API.

Class Method Summary collapse

Class Method Details

.infoString

Gathers information about the API’s versions, properties, resources, and actions.

Returns:

  • (String)

    A string listing the versions, resources, and actions



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/cathode/debug.rb', line 8

def info
  output = ''
  Cathode::Base.versions.each do |version|
    output += "\nVersion #{version.version}"

    version._resources.each do |resource|
      output += "\n  #{resource.name}/"
      resource.actions.each do |action|
        output += "\n    #{action.name}"
      end
    end
  end

  output
end