Class: Swaggard::Swagger::ResponseHeader

Inherits:
Object
  • Object
show all
Defined in:
lib/swaggard/swagger/response_header.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(string) ⇒ ResponseHeader

Returns a new instance of ResponseHeader.



6
7
8
# File 'lib/swaggard/swagger/response_header.rb', line 6

def initialize(string)
  parse(string)
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/swaggard/swagger/response_header.rb', line 4

def name
  @name
end

Instance Method Details

#to_docObject



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

def to_doc
  {
    'description' => @description,
    'type'        => @type,
  }
end