Class: FbGraph::AdKeywordValid

Inherits:
Node
  • Object
show all
Extended by:
Searchable
Defined in:
lib/fb_graph/ad_keyword_valid.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#access_token, #endpoint, #identifier, #raw_attributes

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Searchable

search, search

Methods inherited from Node

#connection, #destroy, #fetch, fetch, #update

Methods included from Comparison

#==

Constructor Details

#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

Instance Attribute Details

#nameObject

Returns the value of attribute name



5
6
7
# File 'lib/fb_graph/ad_keyword_valid.rb', line 5

def name
  @name
end

#suggestionsObject

Returns the value of attribute suggestions



5
6
7
# File 'lib/fb_graph/ad_keyword_valid.rb', line 5

def suggestions
  @suggestions
end

#validObject Also known as: valid?

Returns the value of attribute valid



5
6
7
# File 'lib/fb_graph/ad_keyword_valid.rb', line 5

def valid
  @valid
end

Class Method Details

.search_query_paramObject



19
20
21
# File 'lib/fb_graph/ad_keyword_valid.rb', line 19

def self.search_query_param
  :keyword_list
end