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.



10
11
12
13
14
15
16
17
# File 'lib/facebooker/models/page.rb', line 10

def initialize(*args)
  super

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