Sha256: a571853a3ceefe97785dc934a54064660ee3099aadc0c6f8b8d17217a97715d5

Contents?: true

Size: 408 Bytes

Versions: 3

Compression:

Stored size: 408 Bytes

Contents

module TMDBParty
  class Person
    include Attributes
    attributes :name, :url, :job
    
    def initialize(values)
      self.attributes = values
    end
    
    def self.parse(data)
      return unless data
      data = data["person"]
      if data.is_a?(Array)
        data.collect do |person|
          Person.new(person)
        end
      else
        [Person.new(data)]
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
maddox-tmdb_party-0.3.0 lib/tmdb_party/person.rb
tmdb_party-0.3.1 lib/tmdb_party/person.rb
tmdb_party-0.3.0 lib/tmdb_party/person.rb