Sha256: 6d83848ce9b53d0cdb8078ad6a00bff2d2a938fe7060535a7fa5d3031789f1d0

Contents?: true

Size: 353 Bytes

Versions: 2

Compression:

Stored size: 353 Bytes

Contents

require "ykutils/treemanager"

module Ykutils
  class TreeManager
    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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ykutils-0.1.10 lib/ykutils/treemanagera.rb
ykutils-0.1.8 lib/ykutils/treemanagera.rb