Parent

Voodoo::SymbolTracker

Class to keep track of defined and used symbols.

Public Class Methods

new() click to toggle source
# File voodoo/symbol_tracker.rb, line 6
def initialize
  @defined = Set.new
  @used = Set.new
end

Public Instance Methods

define(*symbols) click to toggle source
# File voodoo/symbol_tracker.rb, line 11
def define *symbols
  @defined.merge symbols
end
defined_but_unused_symbols() click to toggle source
# File voodoo/symbol_tracker.rb, line 19
def defined_but_unused_symbols
  @defined - @used
end
defined_symbols() click to toggle source
# File voodoo/symbol_tracker.rb, line 23
def defined_symbols
  @defined
end
use(*symbols) click to toggle source
# File voodoo/symbol_tracker.rb, line 15
def use *symbols
  @used.merge symbols
end
used_but_undefined_symbols() click to toggle source
# File voodoo/symbol_tracker.rb, line 31
def used_but_undefined_symbols
  @used - @defined
end
used_symbols() click to toggle source
# File voodoo/symbol_tracker.rb, line 27
def used_symbols
  @used
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.