Sha256: dd50e8006aba5f114b99b3bd9c2af18763ad431c786d1966c0c2e541585eb7f9
Contents?: true
Size: 758 Bytes
Versions: 14
Compression:
Stored size: 758 Bytes
Contents
class CoffeeScriptParser def initialize(dir) @dir = dir # TODO: Tidy! if (RUBY_PLATFORM =~ /mswin32/) @dir = @dir.gsub('/', '\\') end end def parse_result(detail) if (detail.strip == '') return :success, 'All files compiled', '' end summary_line = detail.grep( /^In .*/ )[0] if summary_line.nil? # error error_info = (detail + "\nUnknown Error!").to_a[0].strip return :error, 'Error', error_info end return :failure, 'Failed to compile', strip_dir(summary_line[3..-1].strip) end def strip_dir(text) # Move to function/class w/ win32 related code if (text[0, @dir.length] == @dir) text = text[(@dir.length + 1)..-1] end end end
Version data entries
14 entries across 14 versions & 1 rubygems