class NicInfo::DataNode

Attributes

alert[RW]
children[RW]
data[RW]
data_type[RW]
handle[RW]
rest_ref[RW]

Public Class Methods

new(name, handle = nil, rest_ref = nil, data = nil, data_type = nil) click to toggle source
# File lib/nicinfo/data_tree.rb, line 25
def initialize name, handle = nil, rest_ref = nil, data = nil, data_type = nil
  @name = name
  @children = []
  @data = data
  @handle = handle
  @rest_ref = rest_ref
  @data_type = data_type
end

Public Instance Methods

<=>(x) click to toggle source
# File lib/nicinfo/data_tree.rb, line 46
def <=> x
  @name <=> x.to_s
end
add_child(node) click to toggle source
# File lib/nicinfo/data_tree.rb, line 34
def add_child node
  @children << node if node
end
empty?() click to toggle source
# File lib/nicinfo/data_tree.rb, line 42
def empty?
  @children.empty?
end
has_meta_info() click to toggle source
# File lib/nicinfo/data_tree.rb, line 50
def has_meta_info
  return true if @handle
  return true if @rest_ref
  return true if @data
  return false
end
to_s() click to toggle source
# File lib/nicinfo/data_tree.rb, line 38
def to_s
  @name
end