class SfFilmLocations::Location
Attributes
actor_1[R]
actor_2[R]
location[R]
title[R]
Public Class Methods
all()
click to toggle source
# File lib/sf_film_locations.rb, line 16 def self.all locations_array = Unirest.get("https://data.sfgov.org/resource/wwmu-gmzc.json").body locations = [] locations_array.each do |location_hash| locations << Location.new(location_hash) end return locations end
new(hash)
click to toggle source
# File lib/sf_film_locations.rb, line 9 def initialize(hash) @location = hash["locations"] @title = hash["title"] @actor_1 = hash["actor_1"] @actor_2 = hash["actor_2"] end