Class: Hyperion::ResultMaker
- Inherits:
-
Object
- Object
- Hyperion::ResultMaker
- Includes:
- Formats
- Defined in:
- lib/hyperion/result_handling/result_maker.rb
Overview
Produces a hyperion result object from a typhoeus result object
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(route) ⇒ ResultMaker
constructor
A new instance of ResultMaker.
- #make(typho_result, continuation = nil) ⇒ Object
Methods included from Formats
Methods included from Logger
#log_stub, #logger, #with_request_logging
Constructor Details
#initialize(route) ⇒ ResultMaker
Returns a new instance of ResultMaker.
15 16 17 |
# File 'lib/hyperion/result_handling/result_maker.rb', line 15 def initialize(route) @route = route end |
Class Method Details
.make(route, typho_result, continuation = nil) ⇒ Object
11 12 13 |
# File 'lib/hyperion/result_handling/result_maker.rb', line 11 def self.make(route, typho_result, continuation=nil) self.new(route).make(typho_result, continuation) end |
Instance Method Details
#make(typho_result, continuation = nil) ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/hyperion/result_handling/result_maker.rb', line 19 def make(typho_result, continuation=nil) if continuation result = make_from_typho(typho_result, DispatchingHyperionResult) result.__set_escape_continuation__(continuation) result else make_from_typho(typho_result, HyperionResult) end end |