Class: PortaText::Command::Descriptor

Inherits:
Object
  • Object
show all
Defined in:
lib/portatext/command/descriptor.rb

Overview

This class holds the descriptor with the needed information to call an endpoint.

Author

Marcelo Gornstein ([email protected])

Copyright

Copyright © 2015 PortaText

License

Apache-2.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uri, method, headers, body, output_file = nil) ⇒ Descriptor

Returns a new instance of Descriptor.



16
17
18
19
20
21
22
# File 'lib/portatext/command/descriptor.rb', line 16

def initialize(uri, method, headers, body, output_file = nil)
  @uri = uri
  @method = method
  @headers = headers
  @body = body
  @output_file = output_file
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



13
14
15
# File 'lib/portatext/command/descriptor.rb', line 13

def body
  @body
end

#headersObject

Returns the value of attribute headers.



12
13
14
# File 'lib/portatext/command/descriptor.rb', line 12

def headers
  @headers
end

#methodObject

Returns the value of attribute method.



11
12
13
# File 'lib/portatext/command/descriptor.rb', line 11

def method
  @method
end

#output_fileObject

Returns the value of attribute output_file.



14
15
16
# File 'lib/portatext/command/descriptor.rb', line 14

def output_file
  @output_file
end

#uriObject

Returns the value of attribute uri.



10
11
12
# File 'lib/portatext/command/descriptor.rb', line 10

def uri
  @uri
end