Sha256: 078cec5697b7bef6736bef50e49be58cd7718c76dde70a9c658707eb4ceb7487

Contents?: true

Size: 376 Bytes

Versions: 3

Compression:

Stored size: 376 Bytes

Contents

require "ykutils/treemanager"

module Ykutils
  class TreeManager
    def addTag(node_name, tag_name)
      @tag ||= {}

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

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ykutils-0.1.4 lib/ykutils/treemanagera.rb
ykutils-0.1.3 lib/ykutils/treemanagera.rb
ykutils-0.1.1 lib/ykutils/treemanagera.rb