Class: NasaApi::ResponseHandler::NeoFeed

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 = {}) ⇒ NeoFeed

Returns a new instance of NeoFeed.



79
80
81
82
83
84
# File 'lib/nasa_api/response_handler.rb', line 79

def initialize(response = {})
  @response = response
  @links = response['links']
  @element_count = response['element_count']
  @near_earth_objects = response['near_earth_objects']
end

Instance Attribute Details

#element_countObject

Returns the value of attribute element_count.



77
78
79
# File 'lib/nasa_api/response_handler.rb', line 77

def element_count
  @element_count
end

Returns the value of attribute links.



77
78
79
# File 'lib/nasa_api/response_handler.rb', line 77

def links
  @links
end

#near_earth_objectsObject

Returns the value of attribute near_earth_objects.



77
78
79
# File 'lib/nasa_api/response_handler.rb', line 77

def near_earth_objects
  @near_earth_objects
end

#responseObject

Returns the value of attribute response.



77
78
79
# File 'lib/nasa_api/response_handler.rb', line 77

def response
  @response
end