Class Limelight::Templates::TemplaterLogger
In: lib/limelight/templates/templater_logger.rb
Parent: Object

Templaters uses this class to log activity.

Methods

Attributes

output  [RW]  An accessor to the output IO. Defaults to STDOUT

Public Class methods

[Source]

    # File lib/limelight/templates/templater_logger.rb, line 15
15:       def initialize
16:         @output = STDOUT
17:       end

Public Instance methods

[Source]

    # File lib/limelight/templates/templater_logger.rb, line 19
19:       def creating_directory(name)
20:         @output.puts "\tcreating directory:  #{name}"
21:       end

[Source]

    # File lib/limelight/templates/templater_logger.rb, line 23
23:       def creating_file(name)
24:         @output.puts "\tcreating file:       #{name}"
25:       end

[Source]

    # File lib/limelight/templates/templater_logger.rb, line 27
27:       def file_already_exists(name)
28:         @output.puts "\tfile already exists: #{name}"
29:       end

[Source]

    # File lib/limelight/templates/templater_logger.rb, line 31
31:       def log(message, name)
32:         spaces = 21 - message.length - 1
33:         @output.puts "\t#{message}:#{' '*spaces}#{name}"
34:       end

[Validate]