Class: GEXF::NodeSet

Inherits:
Set
  • Object
show all
Extended by:
Forwardable
Includes:
Attribute::Definable
Defined in:
lib/gexf/nodeset.rb

Instance Method Summary collapse

Methods included from Attribute::Definable

#attribute_definitions, #attributes, #define_attribute

Instance Method Details

#<<(node) ⇒ Object



7
8
9
# File 'lib/gexf/nodeset.rb', line 7

def <<(node)
  @hash[node.id] = node if node.is_a?(GEXF::Node)
end

#each(&block) ⇒ Object



11
12
13
# File 'lib/gexf/nodeset.rb', line 11

def each(&block)
  @hash.values.each(&block)
end

#inspectObject



15
16
17
# File 'lib/gexf/nodeset.rb', line 15

def inspect
  "<GEXF::NodeSet #{@hash.keys}>"
end