Class: Parliament::Builder::BaseResponseBuilder
- Inherits:
-
Object
- Object
- Parliament::Builder::BaseResponseBuilder
- Defined in:
- lib/parliament/builder/base_response_builder.rb
Overview
Base response builder, allowing the user to return the body of an HTTPResponse.
Instance Method Summary collapse
-
#build ⇒ Parliament::Response::Base::Response
Builds a Parliament::Response::BaseResponse.
-
#initialize(response:, decorators: nil) ⇒ BaseResponseBuilder
constructor
Creates a new BaseResponseBuilder.
Constructor Details
#initialize(response:, decorators: nil) ⇒ BaseResponseBuilder
Creates a new BaseResponseBuilder.
9 10 11 12 |
# File 'lib/parliament/builder/base_response_builder.rb', line 9 def initialize(response:, decorators: nil) @response = response _ = decorators end |
Instance Method Details
#build ⇒ Parliament::Response::Base::Response
Builds a Parliament::Response::BaseResponse.
17 18 19 |
# File 'lib/parliament/builder/base_response_builder.rb', line 17 def build Parliament::Response::BaseResponse.new(@response) end |