Class: Swaggard::Swagger::Parameters::Path

Inherits:
Base
  • Object
show all
Defined in:
lib/swaggard/swagger/parameters/path.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#is_required

Instance Method Summary collapse

Methods inherited from Base

#to_doc

Constructor Details

#initialize(operation, param_name) ⇒ Path

Returns a new instance of Path.



10
11
12
13
14
15
16
# File 'lib/swaggard/swagger/parameters/path.rb', line 10

def initialize(operation, param_name)
  @operation = operation
  @in = 'path'
  @name = param_name.to_s
  @data_type = 'string'
  @is_required = true
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/swaggard/swagger/parameters/path.rb', line 8

def name
  @name
end

#operationObject (readonly)

Returns the value of attribute operation.



8
9
10
# File 'lib/swaggard/swagger/parameters/path.rb', line 8

def operation
  @operation
end

Instance Method Details

#descriptionObject



18
19
20
# File 'lib/swaggard/swagger/parameters/path.rb', line 18

def description
  @description ||= get_description
end