Sha256: b108c52b840c55b4c2c3ff9e680bd709bc3a2cefa41300586e8b7ddc90e319e5
Contents?: true
Size: 649 Bytes
Versions: 5
Compression:
Stored size: 649 Bytes
Contents
require 'rubygems' require 'ruby_parser' require 'erb' module Simplabs module Excellent module Parsing class Parser #:nodoc: def parse(content, filename) return silent_parse(content, filename) rescue Exception #continue on errors end private def silent_parse(content, filename) @parser ||= RUBY_VERSION =~ /2\.0/ ? Ruby19Parser.new : RubyParser.for_current_ruby content = ::ERB.new(content, nil, '-').src if filename =~ /\.erb$/ sexp = @parser.parse(content, filename) sexp end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems