Sha256: e3b714d115e45d298da00fe6fd79077a8a0a67671ede452c463758b7c01d5287

Contents?: true

Size: 548 Bytes

Versions: 14

Compression:

Stored size: 548 Bytes

Contents

module Reek
  module AST
    module SexpExtensions
      # Base module for utility methods for :and and :or nodes.
      module LogicOperatorBase
        def condition
          children.first
        end

        def body_nodes(type, ignoring = [])
          children[1].find_nodes type, ignoring
        end
      end

      # Utility methods for :and nodes.
      module AndNode
        include LogicOperatorBase
      end

      # Utility methods for :or nodes.
      module OrNode
        include LogicOperatorBase
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
reek-3.11 lib/reek/ast/sexp_extensions/logical_operators.rb
reek-3.10.2 lib/reek/ast/sexp_extensions/logical_operators.rb
reek-3.10.1 lib/reek/ast/sexp_extensions/logical_operators.rb
reek-3.10.0 lib/reek/ast/sexp_extensions/logical_operators.rb
reek-3.9.1 lib/reek/ast/sexp_extensions/logical_operators.rb
reek-3.9.0 lib/reek/ast/sexp_extensions/logical_operators.rb
reek-3.8.3 lib/reek/ast/sexp_extensions/logical_operators.rb
reek-3.8.2 lib/reek/ast/sexp_extensions/logical_operators.rb
reek-3.8.1 lib/reek/ast/sexp_extensions/logical_operators.rb
reek-3.8.0 lib/reek/ast/sexp_extensions/logical_operators.rb
reek-3.7.1 lib/reek/ast/sexp_extensions/logical_operators.rb
reek-3.7.0 lib/reek/ast/sexp_extensions/logical_operators.rb
reek-3.6.1 lib/reek/ast/sexp_extensions/logical_operators.rb
reek-3.6.0 lib/reek/ast/sexp_extensions/logical_operators.rb