Sha256: 33425e4d2f4d06357dd4bf0eae8a85d88877cd55400c3b3b99a3cab11412bcbe
Contents?: true
Size: 518 Bytes
Versions: 2
Compression:
Stored size: 518 Bytes
Contents
# frozen_string_literal: true module Reek module AST module SexpExtensions # Utility methods for :const nodes. module ConstNode # TODO: name -> full_name, simple_name -> name def name if namespace "#{namespace.format_to_ruby}::#{simple_name}" else simple_name.to_s end end def simple_name children.last end def namespace children.first end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
reek-4.6.1 | lib/reek/ast/sexp_extensions/constant.rb |
reek-4.6.0 | lib/reek/ast/sexp_extensions/constant.rb |