Class: Clarification::Requester

Inherits:
Object
  • Object
show all
Defined in:
lib/clarification/requester.rb

Direct Known Subclasses

PredictRequester, SearchRequester, TrainRequester

Instance Method Summary collapse

Constructor Details

#initialize(model_array = []) ⇒ Requester


4
5
6
# File 'lib/clarification/requester.rb', line 4

def initialize(model_array=[])
  @model_array = model_array
end

Instance Method Details

#get(target_url) ⇒ Object


8
9
10
11
12
13
14
15
# File 'lib/clarification/requester.rb', line 8

def get(target_url)
  response = {}
  @model_array.each do |model|
    response[model] = get_with_model(target_url, model)
  end

  response
end