Class: FilmLocationsGem::FilmInSf

Inherits:
Object
  • Object
show all
Defined in:
lib/film_locations_gem.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ FilmInSf

Returns a new instance of FilmInSf.



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/film_locations_gem.rb', line 8

def initialize(hash)
  @actor_1 = hash['actor_1']
  @actor_2 = hash['actor_2']
  @actor_3 = hash['actor_3']
  @director = hash['director']
  @locations = hash['locations']
  @production_company = hash['production_company']
  @release_year = hash['release_year']
  @title = hash['title']
  @writer = hash['writer']
end

Instance Attribute Details

#actor_1Object (readonly)

Returns the value of attribute actor_1.



6
7
8
# File 'lib/film_locations_gem.rb', line 6

def actor_1
  @actor_1
end

#actor_2Object (readonly)

Returns the value of attribute actor_2.



6
7
8
# File 'lib/film_locations_gem.rb', line 6

def actor_2
  @actor_2
end

#actor_3Object (readonly)

Returns the value of attribute actor_3.



6
7
8
# File 'lib/film_locations_gem.rb', line 6

def actor_3
  @actor_3
end

#directorObject (readonly)

Returns the value of attribute director.



6
7
8
# File 'lib/film_locations_gem.rb', line 6

def director
  @director
end

#locationsObject (readonly)

Returns the value of attribute locations.



6
7
8
# File 'lib/film_locations_gem.rb', line 6

def locations
  @locations
end

#production_companyObject (readonly)

Returns the value of attribute production_company.



6
7
8
# File 'lib/film_locations_gem.rb', line 6

def production_company
  @production_company
end

#release_yearObject (readonly)

Returns the value of attribute release_year.



6
7
8
# File 'lib/film_locations_gem.rb', line 6

def release_year
  @release_year
end

#titleObject (readonly)

Returns the value of attribute title.



6
7
8
# File 'lib/film_locations_gem.rb', line 6

def title
  @title
end

#writerObject (readonly)

Returns the value of attribute writer.



6
7
8
# File 'lib/film_locations_gem.rb', line 6

def writer
  @writer
end

Class Method Details

.allObject



20
21
22
23
24
25
26
27
# File 'lib/film_locations_gem.rb', line 20

def self.all
  # film_locations = []
  film_locations_array = Unirest.get("https://data.sfgov.org/resource/wwmu-gmzc.json").body
  # film_locations_array.each do |film_location|
    # film_locations << film_location
  # end
  # film_locations_array
end