Class: Facebooker::Page::Genre

Inherits:
Object
  • Object
show all
Includes:
Model
Defined in:
lib/facebooker/models/page.rb

Constant Summary collapse

FIELDS =
[ :dance, :party, :relax, :talk, :think, :workout, :sing, :intimate, :raunchy, :headphones ]

Instance Method Summary collapse

Methods included from Model

#anon=, included, #populate, #populate_from_hash!, #populated?, #session

Constructor Details

#initialize(*args) ⇒ Genre

Returns a new instance of Genre.



18
19
20
21
22
23
24
25
# File 'lib/facebooker/models/page.rb', line 18

def initialize(*args)
  super

  # convert '1'/'0' to true/false
  FIELDS.each do |field|
    self.send("#{field}=", self.send(field) == '1')
  end
end