Class: Sistrix::Keyword::Sem::Record

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

Instance Method Summary collapse

Methods included from Record

#keys, #method_missing

Constructor Details

#initialize(xml_node) ⇒ Record

Returns a new instance of Record.



43
44
45
46
47
48
49
50
# File 'lib/sistrix/keyword/sem.rb', line 43

def initialize(xml_node)
  @data = {}

  @data[:position] = xml_node['position'].strip.to_i
  @data[:title] = xml_node['title'].to_s.strip
  @data[:text] = xml_node['text'].to_s.strip
  @data[:displayurl] = xml_node['displayurl'].to_s.strip
end

Dynamic Method Handling

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