Class: Ykutils::TreeManager

Inherits:
Object
  • Object
show all
Defined in:
lib/ykutils/treemanagera.rb

Instance Method Summary collapse

Instance Method Details

#add_tag(node_name, tag_name) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/ykutils/treemanagera.rb', line 5

def add_tag(node_name, tag_name)
  @tag ||= {}

  if @tag[node_name]
    @tag[node_name] << tag_name
  else
    @tag[node_name] = [tag_name]
  end
end

#tag(node_name) ⇒ Object



15
16
17
18
19
# File 'lib/ykutils/treemanagera.rb', line 15

def tag(node_name)
  ret = nil
  ret = @tag[node_name] if @tag
  ret
end