Class: Sexp

Inherits:
Object show all
Defined in:
lib/reek/code_parser.rb

Instance Method Summary collapse

Instance Method Details

#childrenObject



13
14
15
# File 'lib/reek/code_parser.rb', line 13

def children
  find_all { |item| Sexp === item }
end

#has_type?(type) ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/reek/code_parser.rb', line 21

def has_type?(type)
  is_language_node? and first == type
end

#is_language_node?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/reek/code_parser.rb', line 17

def is_language_node?
  first.class == Symbol
end