Parent

Scrubyt::Result

Represents the results of a pattern

Attributes

childmap[R]
instances[R]

Public Class Methods

new() click to toggle source
# File lib/scrubyt/output/result.rb, line 8
def initialize
  @childmap ||= []
end

Public Instance Methods

add_result(source, result) click to toggle source
# File lib/scrubyt/output/result.rb, line 12
def add_result(source, result)
  @childmap.each do |hash|
    if hash.keys[0] == source
      hash[source] << result if !hash[source].include? result
      return
    end
  end
  @childmap << {source => [result]}
end
lookup(last_result) click to toggle source
# File lib/scrubyt/output/result.rb, line 22
def lookup(last_result)
  @childmap.each do |hashes|
    hashes.each { |key, value| return value if (key == last_result) }
  end
  nil
end#end of method lookup

[Validate]

Generated with the Darkfish Rdoc Generator 2.