Class: DeltaCloud::Documentation

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

Defined Under Namespace

Classes: OperationParameter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api, opts = {}) ⇒ Documentation

Returns a new instance of Documentation.



25
26
27
28
29
30
31
32
# File 'lib/documentation.rb', line 25

def initialize(api, opts={})
  @description, @api = opts[:description], api
  @params = parse_parameters(opts[:params]) if opts[:params]
  @collection_operations = opts[:operations] if opts[:operations]
  @collection = opts[:collection]
  @operation = opts[:operation]
  self
end

Instance Attribute Details

#apiObject (readonly)

Returns the value of attribute api.



22
23
24
# File 'lib/documentation.rb', line 22

def api
  @api
end

#collectionObject (readonly)

Returns the value of attribute collection.



23
24
25
# File 'lib/documentation.rb', line 23

def collection
  @collection
end

#collection_operationsObject (readonly)

Returns the value of attribute collection_operations.



22
23
24
# File 'lib/documentation.rb', line 22

def collection_operations
  @collection_operations
end

#descriptionObject (readonly)

Returns the value of attribute description.



22
23
24
# File 'lib/documentation.rb', line 22

def description
  @description
end

#operationObject (readonly)

Returns the value of attribute operation.



23
24
25
# File 'lib/documentation.rb', line 23

def operation
  @operation
end

#paramsObject (readonly)

Returns the value of attribute params.



22
23
24
# File 'lib/documentation.rb', line 22

def params
  @params
end

Instance Method Details

#operationsObject



34
35
36
# File 'lib/documentation.rb', line 34

def operations
  @collection_operations.collect { |o| api.documentation(@collection, o) }
end