Sha256: 9766d30e9edd30d517d2f5646c33ca093baf136940cd5b07ae6c6ac0e6658b9e

Contents?: true

Size: 431 Bytes

Versions: 12

Compression:

Stored size: 431 Bytes

Contents

require 'reek/core/code_context'
require 'reek/source/sexp_formatter'

module Reek
  module Core
    #
    # A context wrapper for any module found in a syntax tree.
    #
    class ModuleContext < CodeContext
      def initialize(outer, exp)
        super(outer, exp)
        @name = Source::SexpFormatter.format(exp.children.first)
      end

      def node_instance_methods
        local_nodes(:def)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
reek-2.0.4 lib/reek/core/module_context.rb
reek-2.0.3 lib/reek/core/module_context.rb
reek-2.0.2 lib/reek/core/module_context.rb
reek-2.0.1 lib/reek/core/module_context.rb
reek-2.0.0 lib/reek/core/module_context.rb
reek-1.6.6 lib/reek/core/module_context.rb
reek-1.6.5 lib/reek/core/module_context.rb
reek-1.6.4 lib/reek/core/module_context.rb
reek-1.6.3 lib/reek/core/module_context.rb
reek-1.6.2 lib/reek/core/module_context.rb
reek-1.6.1 lib/reek/core/module_context.rb
reek-1.6.0 lib/reek/core/module_context.rb