Class: Sanity::Http::Results

Inherits:
Object
  • Object
show all
Defined in:
lib/sanity/http/results.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result) ⇒ Results

Returns a new instance of Results.



14
15
16
# File 'lib/sanity/http/results.rb', line 14

def initialize(result)
  @raw_result = result
end

Instance Attribute Details

#raw_resultObject (readonly)

Returns the value of attribute raw_result.



12
13
14
# File 'lib/sanity/http/results.rb', line 12

def raw_result
  @raw_result
end

Class Method Details

.call(result) ⇒ Object



7
8
9
# File 'lib/sanity/http/results.rb', line 7

def call(result)
  new(result).call
end

Instance Method Details

#callObject

TODO: parse the JSON and return what the user asked for whether that just be the response, the document ids, or the the document object(s) the user mutated



21
22
23
# File 'lib/sanity/http/results.rb', line 21

def call
  raw_result
end