Class: Conductor::Model
- Inherits:
-
Object
- Object
- Conductor::Model
- Defined in:
- lib/nf-conductor/http/model.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#status ⇒ Object
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(response) ⇒ Model
constructor
A new instance of Model.
Constructor Details
#initialize(response) ⇒ Model
Returns a new instance of Model.
6 7 8 |
# File 'lib/nf-conductor/http/model.rb', line 6 def initialize(response) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/nf-conductor/http/model.rb', line 3 def response @response end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/nf-conductor/http/model.rb', line 4 def status @status end |
Class Method Details
.build(response) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/nf-conductor/http/model.rb', line 10 def self.build(response) { status: response.status, body: response.body } end |