Sha256: ae3437ee6aa18c705c33adbc94d4335baa02da0554889b22c8d5d7c65368108b

Contents?: true

Size: 410 Bytes

Versions: 6

Compression:

Stored size: 410 Bytes

Contents

module Reek
  module AST
    module SexpExtensions
      # Utility methods for :const nodes.
      module ConstNode
        def name
          namespace = children.first
          if namespace
            "#{namespace.format_to_ruby}::#{simple_name}"
          else
            simple_name.to_s
          end
        end

        def simple_name
          children.last
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
reek-3.11 lib/reek/ast/sexp_extensions/constant.rb
reek-3.10.2 lib/reek/ast/sexp_extensions/constant.rb
reek-3.10.1 lib/reek/ast/sexp_extensions/constant.rb
reek-3.10.0 lib/reek/ast/sexp_extensions/constant.rb
reek-3.9.1 lib/reek/ast/sexp_extensions/constant.rb
reek-3.9.0 lib/reek/ast/sexp_extensions/constant.rb