Class: Sistrix::Keyword::Record

Inherits:
Object
  • Object
show all
Includes:
Record
Defined in:
lib/sistrix/keyword.rb

Instance Method Summary collapse

Methods included from Record

#keys, #method_missing

Constructor Details

#initialize(xml_node) ⇒ Record

Returns a new instance of Record.



49
50
51
52
53
54
55
# File 'lib/sistrix/keyword.rb', line 49

def initialize(xml_node)
  @data = {}

  @data[:method] = xml_node['method'].to_s.strip
  @data[:url] = xml_node['url'].to_s.strip
  @data[:name] = xml_node['name'].to_s.strip
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Sistrix::Record

Instance Method Details

#methodObject



37
38
39
# File 'lib/sistrix/keyword.rb', line 37

def method
  @data[:method]
end

#nameObject



45
46
47
# File 'lib/sistrix/keyword.rb', line 45

def name
  @data[:name]
end

#urlObject



41
42
43
# File 'lib/sistrix/keyword.rb', line 41

def url
  @data[:url]
end