Sha256: fb767e59432c880e95b141868db5be1a4426f812dc7989e4dfc7c5bf21ae6152
Contents?: true
Size: 770 Bytes
Versions: 20
Compression:
Stored size: 770 Bytes
Contents
require 'simplabs/excellent/parsing/cyclomatic_complexity_measure' module Simplabs module Excellent module Parsing class BlockContext < SexpContext #:nodoc: include CyclomaticComplexityMeasure include FlogMeasure attr_reader :parameters attr_reader :calls def initialize(exp, parent) super @parameters = [] @name = 'block' @line = exp.line < exp[1].line ? exp.line : exp[1].line @calls = Hash.new(0) end def full_name @name end def record_call_to(exp) @calls[exp] += 1 end def inside_block? @parent.is_a?(BlockContext) end end end end end
Version data entries
20 entries across 20 versions & 2 rubygems