Class: GoFigure::StubHttpFetcher::StringResponse
- Inherits:
-
Object
- Object
- GoFigure::StubHttpFetcher::StringResponse
- Includes:
- Response
- Defined in:
- lib/go_figure/test/stub_http_fetcher.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(content, code = 200, headers = {}) ⇒ StringResponse
constructor
A new instance of StringResponse.
Methods included from Response
Constructor Details
#initialize(content, code = 200, headers = {}) ⇒ StringResponse
Returns a new instance of StringResponse.
23 24 25 26 27 |
# File 'lib/go_figure/test/stub_http_fetcher.rb', line 23 def initialize(content, code = 200, headers = {}) @content = content @code = code.to_s @headers = headers end |
Instance Method Details
#execute ⇒ Object
29 30 31 |
# File 'lib/go_figure/test/stub_http_fetcher.rb', line 29 def execute HashStruct.new(:body => @content, :code => @code, :headers => @headers) end |