Class: Sexp
Overview
Extensions to Sexp
to allow CodeParser
to navigate the abstract syntax tree more easily.
Instance Method Summary collapse
Instance Method Details
#children ⇒ Object
17 18 19 |
# File 'lib/reek/code_parser.rb', line 17 def children find_all { |item| Sexp === item } end |
#has_type?(type) ⇒ Boolean
25 26 27 |
# File 'lib/reek/code_parser.rb', line 25 def has_type?(type) is_language_node? and first == type end |
#is_language_node? ⇒ Boolean
21 22 23 |
# File 'lib/reek/code_parser.rb', line 21 def is_language_node? first.class == Symbol end |