Sha256: 3040f8333d45d899fbdd9836d4f9b35c21f345549fae70e1ac037be343dcdc45
Contents?: true
Size: 967 Bytes
Versions: 13
Compression:
Stored size: 967 Bytes
Contents
require 'facebooker/model' module Facebooker class Page class Genre include Model FIELDS = [ :dance, :party, :relax, :talk, :think, :workout, :sing, :intimate, :raunchy, :headphones ] attr_accessor(*FIELDS) def initialize(*args) super # convert '1'/'0' to true/false FIELDS.each do |field| self.send("#{field}=", self.send(field) == '1') end end end include Model attr_accessor :page_id, :name, :pic_small, :pic_big, :pic_square, :pic_large, :type, :type, :website, :location, :hours, :band_members, :bio, :hometown, :record_label, :influences, :has_added_app, :founded, :company_overview, :mission, :products, :release_date, :starring, :written_by, :directed_by, :produced_by, :studio, :awards, :plot_outline, :network, :season, :schedule attr_reader :genre def genre=(value) @genre = value.kind_of?(Hash) ? Genre.from_hash(value) : value end end end
Version data entries
13 entries across 13 versions & 5 rubygems