Method: Sexp#module_name
- Defined in:
- lib/code_analyzer/sexp.rb
#module_name ⇒ Sexp
Get the module name of the module node.
s(:module,
s(:const_ref, s(:@const, "Admin", s(1, 7))),
s(:bodystmt, s(:stmts_add, s(:stmts_new), s(:void_stmt)), nil, nil, nil)
)
=> s(:const_ref, s(:@const, "Admin", s(1, 7))),
152 153 154 |
# File 'lib/code_analyzer/sexp.rb', line 152 def module_name self[1] if :module == sexp_type end |