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.
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
#api ⇒ Object (readonly)
Returns the value of attribute api.
22 23 24 |
# File 'lib/documentation.rb', line 22 def api @api end |
#collection ⇒ Object (readonly)
Returns the value of attribute collection.
23 24 25 |
# File 'lib/documentation.rb', line 23 def collection @collection end |
#collection_operations ⇒ Object (readonly)
Returns the value of attribute collection_operations.
22 23 24 |
# File 'lib/documentation.rb', line 22 def collection_operations @collection_operations end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
22 23 24 |
# File 'lib/documentation.rb', line 22 def description @description end |
#operation ⇒ Object (readonly)
Returns the value of attribute operation.
23 24 25 |
# File 'lib/documentation.rb', line 23 def operation @operation end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
22 23 24 |
# File 'lib/documentation.rb', line 22 def params @params end |
Instance Method Details
#operations ⇒ Object
34 35 36 |
# File 'lib/documentation.rb', line 34 def operations @collection_operations.collect { |o| api.documentation(@collection, o) } end |