Class: ESM::Connection::Response
- Inherits:
-
Object
- Object
- ESM::Connection::Response
- Includes:
- Concurrent::Concern::Obligation
- Defined in:
- lib/esm/connection/response.rb
Class Method Summary collapse
-
.fulfilled(content) ⇒ self
Creates a new fulfilled response with the provided data.
-
.rejected(reason) ⇒ self
Creates a new rejected response with the provided reason.
Class Method Details
.fulfilled(content) ⇒ self
Creates a new fulfilled response with the provided data
15 16 17 18 19 |
# File 'lib/esm/connection/response.rb', line 15 def self.fulfilled(content) response = new response.send(:set_state, true, content, nil) response end |
.rejected(reason) ⇒ self
Creates a new rejected response with the provided reason
28 29 30 31 32 |
# File 'lib/esm/connection/response.rb', line 28 def self.rejected(reason) response = new response.send(:set_state, false, nil, reason) response end |