Class: X::Node

Inherits:
Entry show all
Defined in:
lib/rfid-usb-gom-sensor/node.rb

Instance Attribute Summary

Attributes inherited from Entry

#mtime, #name, #path

Instance Method Summary collapse

Methods inherited from Entry

find, #initialize

Constructor Details

This class inherits a constructor from X::Entry

Instance Method Details

#entriesObject



58
59
60
61
62
63
64
65
66
67
# File 'lib/rfid-usb-gom-sensor/node.rb', line 58

def entries 
  debugger if(defined? debugger)
  @entries ||= @data["entries"].map do |entry|
    if a = entry['attribute']
      (Attribute.new a)
    else
      X::Entry.find entry['node']
    end
  end
end

#to_sObject



69
70
71
# File 'lib/rfid-usb-gom-sensor/node.rb', line 69

def to_s
  "#{super.to_s}\n#{entries.inspect}"
end