Class Rascut::Plugin::WriteFcshErrorOutput
In: lib/rascut/plugin/write_fcsh_error_output.rb
Parent: Base

Methods

Public Instance methods

[Source]

    # File lib/rascut/plugin/write_fcsh_error_output.rb, line 8
 8:       def run
 9:         file = config[:filename] || Pathname.new(ENV['HOME']).join('.rascut/error_output')
10:         @path = Pathname.new(file.to_s)
11: 
12:         @command.wrapper.hooks[:compile_error] << method(:write_error_output)
13:         @command.wrapper.hooks[:compile_success] << method(:write_error_none)
14:       end

[Source]

    # File lib/rascut/plugin/write_fcsh_error_output.rb, line 25
25:       def write_error_none(str)
26:         @path.open('w'){|f| f.write '' }
27:       end

[Source]

    # File lib/rascut/plugin/write_fcsh_error_output.rb, line 16
16:       def write_error_output(str)
17:         str.each_line do |line|
18:           if line.match 'Error: '
19:             @path.open('w'){|f| f.puts line.chomp }
20:             break
21:           end
22:         end
23:       end

[Validate]