Class: MockWebService::ResponseOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/mock-web-service/response_options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ ResponseOptions

Returns a new instance of ResponseOptions.

Yields:

  • (_self)

Yield Parameters:



5
6
7
8
9
10
11
12
13
# File 'lib/mock-web-service/response_options.rb', line 5

def initialize
  self.method = :get
  self.path = '/'
  self.status = 200
  self.content_type = 'text/html;charset=utf-8'
  self.headers = {}

  yield self if block_given?
end

Instance Attribute Details

#content_typeObject

Returns the value of attribute content_type.



3
4
5
# File 'lib/mock-web-service/response_options.rb', line 3

def content_type
  @content_type
end

#headersObject

Returns the value of attribute headers.



3
4
5
# File 'lib/mock-web-service/response_options.rb', line 3

def headers
  @headers
end

#methodObject

Returns the value of attribute method.



3
4
5
# File 'lib/mock-web-service/response_options.rb', line 3

def method
  @method
end

#pathObject

Returns the value of attribute path.



3
4
5
# File 'lib/mock-web-service/response_options.rb', line 3

def path
  @path
end

#statusObject

Returns the value of attribute status.



3
4
5
# File 'lib/mock-web-service/response_options.rb', line 3

def status
  @status
end