Class: Neows::Models::Feed

Inherits:
BaseModel show all
Includes:
LinkNavigation, Utils
Defined in:
lib/neows/models/feed.rb

Overview

Reverses the contents of a String or IO object.

Returns:

  • (Boolean)

    if success

Instance Attribute Summary collapse

Attributes included from LinkNavigation

#links

Attributes inherited from BaseModel

#client

Instance Method Summary collapse

Methods included from LinkNavigation

#next, #prev

Methods included from Utils

#classify_list!

Methods inherited from BaseModel

#initialize

Constructor Details

This class inherits a constructor from Neows::Models::BaseModel

Instance Attribute Details

#element_countInteger

Returns number of results

Returns:

  • (Integer)

    number of results


18
# File 'lib/neows/models/feed.rb', line 18

attribute :element_count, Integer

#near_earth_objectsHash[String => Array<Neows::Models::NearEarthObject>]

Returns list of Near Earth Objects grouped by date (YYYY-MM-DD) strings

Returns:


23
# File 'lib/neows/models/feed.rb', line 23

attribute :near_earth_objects, Hash[String => Array]

Instance Method Details

#coerce!self

Modifies existing list of hashes representing Near Earth Objects and coerces them each into #NearEarthObject

Returns:

  • (self)

28
29
30
31
32
33
34
# File 'lib/neows/models/feed.rb', line 28

def coerce!
  near_earth_objects.each_with_index do |data|
    near_earth_objects[data.first] = classify_list!(data[1], Neows::Models::NearEarthObject)
  end

  self
end