Class: FbGraph::AdKeyword
- Extended by:
- Searchable
- Defined in:
- lib/fb_graph/ad_keyword.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from Node
#access_token, #endpoint, #identifier, #raw_attributes
Instance Method Summary collapse
-
#initialize(identifier, attributes = {}) ⇒ AdKeyword
constructor
A new instance of AdKeyword.
- #topic_keyword? ⇒ Boolean
Methods included from Searchable
search, search, search_query_param
Methods inherited from Node
#connection, #destroy, fetch, #fetch, #update
Methods included from Comparison
Constructor Details
#initialize(identifier, attributes = {}) ⇒ AdKeyword
Returns a new instance of AdKeyword.
7 8 9 10 11 12 13 |
# File 'lib/fb_graph/ad_keyword.rb', line 7 def initialize(identifier, attributes = {}) super %w(name description).each do |field| self.send("#{field}=", attributes[field.to_sym]) end end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/fb_graph/ad_keyword.rb', line 5 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/fb_graph/ad_keyword.rb', line 5 def name @name end |
Instance Method Details
#topic_keyword? ⇒ Boolean
15 16 17 |
# File 'lib/fb_graph/ad_keyword.rb', line 15 def topic_keyword? (name =~ /^#/) == 0 end |