Method: FbGraph::AdKeywordValid#initialize
- Defined in:
- lib/fb_graph/ad_keyword_valid.rb
#initialize(identifier, attributes = {}) ⇒ AdKeywordValid
Returns a new instance of AdKeywordValid.
7 8 9 10 11 12 13 14 15 |
# File 'lib/fb_graph/ad_keyword_valid.rb', line 7 def initialize(identifier, attributes = {}) super %w(name valid).each do |field| self.send("#{field}=", attributes[field.to_sym]) end self.suggestions = attributes[:suggestions].collect {|s| FbGraph::AdKeyword.new(s['id'], s)} if attributes[:suggestions] end |