Class: TMDBParty::Studio

Inherits:
Object
  • Object
show all
Includes:
Attributes
Defined in:
lib/tmdb_party/studio.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Attributes

included

Constructor Details

#initialize(attributes) ⇒ Studio

Returns a new instance of Studio.



15
16
17
# File 'lib/tmdb_party/studio.rb', line 15

def initialize(attributes)
  self.attributes = attributes
end

Class Method Details

.parse(data) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/tmdb_party/studio.rb', line 6

def self.parse(data)
  return unless data
  if data.is_a?(Array)
    data.map { |row| Studio.new(row) }
  else
    [Studio.new(data)]
  end
end