Class: MockWebService::ResponseOptions
- Inherits:
-
Object
- Object
- MockWebService::ResponseOptions
- Defined in:
- lib/mock-web-service/response_options.rb
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#method ⇒ Object
Returns the value of attribute method.
-
#path ⇒ Object
Returns the value of attribute path.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ ResponseOptions
constructor
A new instance of ResponseOptions.
Constructor Details
#initialize {|_self| ... } ⇒ ResponseOptions
Returns a new instance of ResponseOptions.
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_type ⇒ Object
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 |
#headers ⇒ Object
Returns the value of attribute headers.
3 4 5 |
# File 'lib/mock-web-service/response_options.rb', line 3 def headers @headers end |
#method ⇒ Object
Returns the value of attribute method.
3 4 5 |
# File 'lib/mock-web-service/response_options.rb', line 3 def method @method end |
#path ⇒ Object
Returns the value of attribute path.
3 4 5 |
# File 'lib/mock-web-service/response_options.rb', line 3 def path @path end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/mock-web-service/response_options.rb', line 3 def status @status end |