Class: Alexa::SitesLinkingIn::Site
- Inherits:
-
Object
- Object
- Alexa::SitesLinkingIn::Site
- Includes:
- Container
- Defined in:
- lib/alexa/sites_linking_in/site.rb
Instance Attribute Summary
Attributes included from Container
Instance Method Summary collapse
-
#initialize(xml_node = nil) ⇒ Site
constructor
A new instance of Site.
Methods included from Container
included, #keys, #method_missing, #to_mongo
Constructor Details
#initialize(xml_node = nil) ⇒ Site
Returns a new instance of Site.
6 7 8 9 10 11 12 13 |
# File 'lib/alexa/sites_linking_in/site.rb', line 6 def initialize(xml_node = nil) @data = {} if ! xml_node.nil? @data[:title] = xml_node.xpath('Title').text.strip @data[:url] = xml_node.xpath('Url').text.strip end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Alexa::Container