Class: GoogleFish::Request

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

Defined Under Namespace

Classes: ApiError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(query) ⇒ Request

Returns a new instance of Request.



29
30
31
# File 'lib/google_fish.rb', line 29

def initialize(query)
  @query = query
end

Instance Attribute Details

#parsed_responseObject

Returns the value of attribute parsed_response.



27
28
29
# File 'lib/google_fish.rb', line 27

def parsed_response
  @parsed_response
end

#queryObject

Returns the value of attribute query.



27
28
29
# File 'lib/google_fish.rb', line 27

def query
  @query
end

#responseObject

Returns the value of attribute response.



27
28
29
# File 'lib/google_fish.rb', line 27

def response
  @response
end

Instance Method Details

#perform_translationObject



33
34
35
36
# File 'lib/google_fish.rb', line 33

def perform_translation
  @response = get
  @parsed_response = parse
end