Class: Conductor::Model

Inherits:
Object
  • Object
show all
Defined in:
lib/nf-conductor/http/model.rb

Direct Known Subclasses

Metadata, Tasks, Workflow

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#responseObject (readonly)

Returns the value of attribute response.



3
4
5
# File 'lib/nf-conductor/http/model.rb', line 3

def response
  @response
end

#statusObject

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