Sha256: e9d9187d992616fa6072ffa5cfa01b2a184b12d59deebf2c05ac2fc9e476b56f
Contents?: true
Size: 951 Bytes
Versions: 52
Compression:
Stored size: 951 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, :genre, :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 def genre=(value) @genre = value.kind_of?(Hash) ? Genre.from_hash(value) : value end end end
Version data entries
52 entries across 52 versions & 11 rubygems