Module: Reek::Source::SexpExtensions::ModuleNode

Included in:
ClassNode
Defined in:
lib/reek/source/sexp_extensions.rb

Overview

Utility methods for :module nodes.

Instance Method Summary collapse

Instance Method Details

#full_name(outer) ⇒ Object


285
286
287
288
# File 'lib/reek/source/sexp_extensions.rb', line 285

def full_name(outer)
  prefix = outer == '' ? '' : "#{outer}::"
  "#{prefix}#{text_name}"
end

#nameObject


279
# File 'lib/reek/source/sexp_extensions.rb', line 279

def name() self[1] end

#simple_nameObject


281
282
283
# File 'lib/reek/source/sexp_extensions.rb', line 281

def simple_name
  name.is_a?(AST::Node) ? name.simple_name : name
end

#text_nameObject


290
291
292
# File 'lib/reek/source/sexp_extensions.rb', line 290

def text_name
  SexpNode.format(name)
end