Class: DeltaCloud::Documentation::OperationParameter
- Inherits:
-
Object
- Object
- DeltaCloud::Documentation::OperationParameter
- Defined in:
- lib/documentation.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#required ⇒ Object
readonly
Returns the value of attribute required.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(data) ⇒ OperationParameter
constructor
A new instance of OperationParameter.
- #to_comment ⇒ Object
Constructor Details
#initialize(data) ⇒ OperationParameter
Returns a new instance of OperationParameter.
41 42 43 |
# File 'lib/documentation.rb', line 41 def initialize(data) @name, @type, @required, @description = data[:name], data[:type], data[:required], data[:description] end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
39 40 41 |
# File 'lib/documentation.rb', line 39 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
36 37 38 |
# File 'lib/documentation.rb', line 36 def name @name end |
#required ⇒ Object (readonly)
Returns the value of attribute required.
38 39 40 |
# File 'lib/documentation.rb', line 38 def required @required end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
37 38 39 |
# File 'lib/documentation.rb', line 37 def type @type end |
Instance Method Details
#to_comment ⇒ Object
45 46 47 |
# File 'lib/documentation.rb', line 45 def to_comment " # @param [#{@type}, #{@name}] #{@description}" end |