Class: StrapiRuby::Endpoint::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/strapi_ruby/endpoint/builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Builder

Returns a new instance of Builder.



4
5
6
7
8
9
# File 'lib/strapi_ruby/endpoint/builder.rb', line 4

def initialize(options = {})
  @resource = options[:resource]
  @document_id = options[:document_id]
  @query = Query.new(options).call
  @result = nil
end

Instance Method Details

#callObject



11
12
13
14
15
# File 'lib/strapi_ruby/endpoint/builder.rb', line 11

def call
  build_endpoint
  append_query
  @result
end