Class Roodi::Checks::ControlCouplingCheck
In: lib/roodi/checks/control_coupling_check.rb
Parent: Roodi::Checks::Check

Methods

Public Instance methods

[Source]

# File lib/roodi/checks/control_coupling_check.rb, line 10
      def evaluate_start_defn(node)
        @method_name = node[1]
        @arguments = node[2][1..-1]
      end

[Source]

# File lib/roodi/checks/control_coupling_check.rb, line 15
      def evaluate_start_lvar(node)
        add_error "Method \"#{@method_name}\" uses the argument \"#{node[1]}\" for internal control." if @arguments.detect {|each| each == node[1]}
      end

[Source]

# File lib/roodi/checks/control_coupling_check.rb, line 6
      def interesting_nodes
        [:defn, :lvar]
      end

[Validate]