Class: Alexa::SitesLinkingIn::Site

Inherits:
Object
  • Object
show all
Includes:
Container
Defined in:
lib/alexa/sites_linking_in/site.rb

Instance Attribute Summary

Attributes included from Container

#data

Instance Method Summary collapse

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