Class: NasaApi::ResponseHandler::NeoLookup

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response = {}) ⇒ NeoLookup

Returns a new instance of NeoLookup.



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/nasa_api/response_handler.rb', line 59

def initialize(response = {})
  @response = response
  @links = response['links']
  @id = response['id']
  @neo_reference_id = response['neo_reference_id']
  @name = response['name']
  @designation = response['designation']
  @nasa_jpl_url = response['nasa_jpl_url']
  @absolute_magnitude_h = response['absolute_magnitude_h']
  @estimated_diameter = response['estimated_diameter']
  @is_potentially_hazardous_asteroid = response['is_potentially_hazardous_asteroid']
  @close_approach_data = response['close_approach_data']
  @orbital_data = response['orbital_data']
  @is_sentry_object = response['is_sentry_object']
end

Instance Attribute Details

#absolute_magnitude_hObject

Returns the value of attribute absolute_magnitude_h.



57
58
59
# File 'lib/nasa_api/response_handler.rb', line 57

def absolute_magnitude_h
  @absolute_magnitude_h
end

#close_approach_dataObject

Returns the value of attribute close_approach_data.



57
58
59
# File 'lib/nasa_api/response_handler.rb', line 57

def close_approach_data
  @close_approach_data
end

#designationObject

Returns the value of attribute designation.



57
58
59
# File 'lib/nasa_api/response_handler.rb', line 57

def designation
  @designation
end

#estimated_diameterObject

Returns the value of attribute estimated_diameter.



57
58
59
# File 'lib/nasa_api/response_handler.rb', line 57

def estimated_diameter
  @estimated_diameter
end

#idObject

Returns the value of attribute id.



57
58
59
# File 'lib/nasa_api/response_handler.rb', line 57

def id
  @id
end

#is_potentially_hazardous_asteroidObject

Returns the value of attribute is_potentially_hazardous_asteroid.



57
58
59
# File 'lib/nasa_api/response_handler.rb', line 57

def is_potentially_hazardous_asteroid
  @is_potentially_hazardous_asteroid
end

#is_sentry_objectObject

Returns the value of attribute is_sentry_object.



57
58
59
# File 'lib/nasa_api/response_handler.rb', line 57

def is_sentry_object
  @is_sentry_object
end

Returns the value of attribute links.



57
58
59
# File 'lib/nasa_api/response_handler.rb', line 57

def links
  @links
end

#nameObject

Returns the value of attribute name.



57
58
59
# File 'lib/nasa_api/response_handler.rb', line 57

def name
  @name
end

#nasa_jpl_urlObject

Returns the value of attribute nasa_jpl_url.



57
58
59
# File 'lib/nasa_api/response_handler.rb', line 57

def nasa_jpl_url
  @nasa_jpl_url
end

#neo_reference_idObject

Returns the value of attribute neo_reference_id.



57
58
59
# File 'lib/nasa_api/response_handler.rb', line 57

def neo_reference_id
  @neo_reference_id
end

#orbital_dataObject

Returns the value of attribute orbital_data.



57
58
59
# File 'lib/nasa_api/response_handler.rb', line 57

def orbital_data
  @orbital_data
end

#responseObject

Returns the value of attribute response.



57
58
59
# File 'lib/nasa_api/response_handler.rb', line 57

def response
  @response
end