Top Level Namespace

Defined Under Namespace

Modules: DeltaCloud Classes: String

Instance Method Summary (collapse)

Instance Method Details

- (Object) read_method_description(c, method)



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/documentation.rb', line 18

def read_method_description(c, method)
  if method =~ /es$/
    "    # Read #{c.downcase} collection from Deltacloud API"
  else
    case method
      when "uri"
        "    # Return URI to API for this object"
      when "action_urls"
        "    # Return available actions API URL"
      when "client"
        "    # Return instance of API client"
      else
        "    # Get #{method} attribute value from #{c.downcase}"
    end
  end
end

- (Object) read_parameters(c, method)



35
36
37
38
39
40
41
# File 'lib/documentation.rb', line 35

def read_parameters(c, method)
  out = []
  if method =~ /es$/
    out << "    # @param [String, #id] Filter by ID"
  end
  out.join("\n")
end

- (Object) read_return_value(c, method)



43
44
45
46
47
48
49
50
# File 'lib/documentation.rb', line 43

def read_return_value(c, method)
  if method =~ /es$/
    rt = "Array"
  else
    rt = "String"
  end
  "    # @return [String] Value of #{method}"
end