class TweekCatalogue::Participant
Public Class Methods
build_primary_key(attrs)
click to toggle source
# File lib/tweek_catalogue/participant.rb, line 21 def self.build_primary_key(attrs) { video_tmdb_id: attrs[:video_tmdb_id].to_s, person_tmdb_id: attrs[:person_tmdb_id].to_s, character: attrs[:character].to_s, work: attrs[:work].to_s } end
Public Instance Methods
cast?()
click to toggle source
# File lib/tweek_catalogue/participant.rb, line 30 def cast? !!character end
crew?()
click to toggle source
# File lib/tweek_catalogue/participant.rb, line 34 def crew? !!work end
type()
click to toggle source
# File lib/tweek_catalogue/participant.rb, line 38 def type return :cast if cast? return :crew if crew? return :undefined end