Sha256: 70d8d350678ceb4ba77675074125031bc79379df7d81ab1082a72c967f0a8ad9
Contents?: true
Size: 664 Bytes
Versions: 2
Compression:
Stored size: 664 Bytes
Contents
module Mire module Output # checks for a term and print out the occurrences and the occurrences of # this and so on class Occurrence < Base def check(term, levels: 2, indenting: 0, output: []) term = term.to_sym if term return unless methods[term] methods[term][:invocations].each_with_object(output) do |method, o| o << "#{' ' * indenting * 2}#{location(method)}" next unless levels > 0 check(method[:method], levels: levels - 1, indenting: indenting + 1, output: o) end output end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mire-0.1.2 | lib/mire/output/occurrence.rb |
mire-0.1.1 | lib/mire/output/occurrence.rb |