class NoaaNceiWeather::Weather
@abstract Superclass to all of the resource classes used to help filter data
queried using {Data}
Attributes
id[R]
@!attribute [r] id
@return [String] The unique Identifier of the resource
@!attribute [r] name
@return [String] The descriptive name of the resource
name[R]
@!attribute [r] id
@return [String] The unique Identifier of the resource
@!attribute [r] name
@return [String] The descriptive name of the resource
Public Class Methods
all()
click to toggle source
Used to query for all the resources without any filter
@return [Array<Weather>] Returns an array of objects, whichever type is being queried
# File lib/noaa_ncei_weather/weather.rb, line 23 def self.all self.where end
find(endpoint)
click to toggle source
Used to query for a single ID
# File lib/noaa_ncei_weather/weather.rb, line 28 def self.find(endpoint) self.request(endpoint) end
first()
click to toggle source
Used to retrieve a single record with no specification
# File lib/noaa_ncei_weather/weather.rb, line 33 def self.first self.where(limit: 1).first end
new(id, name)
click to toggle source
Creates a new Weather
object
# File lib/noaa_ncei_weather/weather.rb, line 15 def initialize(id, name) @id = id @name = name end