Class: DeltaCloud::Documentation::OperationParameter

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ OperationParameter

Returns a new instance of OperationParameter.



44
45
46
# File 'lib/documentation.rb', line 44

def initialize(data)
  @name, @type, @required, @description = data[:name], data[:type], data[:required], data[:description]
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



42
43
44
# File 'lib/documentation.rb', line 42

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name.



39
40
41
# File 'lib/documentation.rb', line 39

def name
  @name
end

#requiredObject (readonly)

Returns the value of attribute required.



41
42
43
# File 'lib/documentation.rb', line 41

def required
  @required
end

#typeObject (readonly)

Returns the value of attribute type.



40
41
42
# File 'lib/documentation.rb', line 40

def type
  @type
end

Instance Method Details

#to_commentObject



48
49
50
# File 'lib/documentation.rb', line 48

def to_comment
  "   # @param [#{@type}, #{@name}] #{@description}"
end