Module: Reek::AST::SexpExtensions::ConstNode
- Defined in:
- lib/reek/ast/sexp_extensions/constant.rb
Overview
Utility methods for :const nodes.
Instance Method Summary collapse
-
#name ⇒ Object
TODO: name -> full_name, simple_name -> name.
- #namespace ⇒ Object
- #simple_name ⇒ Object
Instance Method Details
#name ⇒ Object
TODO: name -> full_name, simple_name -> name
9 10 11 12 13 14 15 |
# File 'lib/reek/ast/sexp_extensions/constant.rb', line 9 def name if namespace "#{namespace.format_to_ruby}::#{simple_name}" else simple_name.to_s end end |
#namespace ⇒ Object
21 22 23 |
# File 'lib/reek/ast/sexp_extensions/constant.rb', line 21 def namespace children.first end |
#simple_name ⇒ Object
17 18 19 |
# File 'lib/reek/ast/sexp_extensions/constant.rb', line 17 def simple_name children.last end |