Class: WeatherGov::FeatureCollection

Inherits:
Feature
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/weather_gov/feature_collection.rb

Instance Attribute Summary

Attributes inherited from Feature

#client

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Feature

#context, #data, #geometry, #id, #initialize, #properties, #type

Constructor Details

This class inherits a constructor from WeatherGov::Feature

Class Method Details

.feature_classObject



10
11
12
# File 'lib/weather_gov/feature_collection.rb', line 10

def self.feature_class
  Feature
end

Instance Method Details

#featuresObject



14
15
16
# File 'lib/weather_gov/feature_collection.rb', line 14

def features
  @features ||= data.fetch("features").map { |feature| self.class.feature_class.new(client: client, data: feature) }
end