Method: CodeMiner::SexpProcessor#to_sexp

Defined in:
lib/codeminer/sexp_processor.rb

#to_sexp(exp) ⇒ Object



136
137
138
139
140
141
142
143
# File 'lib/codeminer/sexp_processor.rb', line 136

def to_sexp(exp)
  if exp.respond_to?(:type)
    formatter = formatters.fetch(exp.type, SexpFormatter)
    formatter.new(exp, self).to_sexp
  else
    exp
  end
end