Class: DeltaCloud::Documentation
- Inherits:
-
Object
- Object
- DeltaCloud::Documentation
- Defined in:
- lib/documentation.rb
Defined Under Namespace
Classes: OperationParameter
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
Returns the value of attribute api.
-
#collection ⇒ Object
readonly
Returns the value of attribute collection.
-
#collection_operations ⇒ Object
readonly
Returns the value of attribute collection_operations.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#operation ⇒ Object
readonly
Returns the value of attribute operation.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(api, opts = {}) ⇒ Documentation
constructor
A new instance of Documentation.
- #operations ⇒ Object
Constructor Details
#initialize(api, opts = {}) ⇒ Documentation
Returns a new instance of Documentation.
22 23 24 25 26 27 28 29 |
# File 'lib/documentation.rb', line 22 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
#api ⇒ Object (readonly)
Returns the value of attribute api.
19 20 21 |
# File 'lib/documentation.rb', line 19 def api @api end |
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
20 21 22 |
# File 'lib/documentation.rb', line 20 def collection @collection end |
#collection_operations ⇒ Object (readonly)
Returns the value of attribute collection_operations.
19 20 21 |
# File 'lib/documentation.rb', line 19 def collection_operations @collection_operations end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
19 20 21 |
# File 'lib/documentation.rb', line 19 def description @description end |
#operation ⇒ Object (readonly)
Returns the value of attribute operation.
20 21 22 |
# File 'lib/documentation.rb', line 20 def operation @operation end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
19 20 21 |
# File 'lib/documentation.rb', line 19 def params @params end |
Instance Method Details
#operations ⇒ Object
31 32 33 |
# File 'lib/documentation.rb', line 31 def operations @collection_operations.collect { |o| api.documentation(@collection, o) } end |