Sha256: 0ced3095c9a3f893e50189d40a5f0fcbf9a74d6ae54601f578a938408948f436
Contents?: true
Size: 417 Bytes
Versions: 3
Compression:
Stored size: 417 Bytes
Contents
require 'reek/code_context' module Reek class IfContext < CodeContext attr_reader :if_expr def initialize(outer, exp) super @if_expr = exp[1] end def tests_a_parameter? @if_expr[0] == :lvar and has_parameter(@if_expr[1]) end def outer_name @outer.outer_name end def to_s # SMELL: should be unnecessary :( @outer.to_s end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
reek-1.2.5 | lib/reek/if_context.rb |
reek-1.2.4 | lib/reek/if_context.rb |
reek-1.2.3 | lib/reek/if_context.rb |