diff options
author | José Valim <jose.valim@gmail.com> | 2009-07-03 12:32:46 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-07-03 14:57:46 +0200 |
commit | 3ca504c966b8cf3ad51cdccd3377efc33fccab33 (patch) | |
tree | 7a0c363e18480c3e29ab72e1ffb53e9d6734908a /railties/lib/rails_generator/simple_logger.rb | |
parent | de68cf7e0624e7d8e7e94034858a061ca0f6f68c (diff) | |
download | rails-3ca504c966b8cf3ad51cdccd3377efc33fccab33.tar.gz rails-3ca504c966b8cf3ad51cdccd3377efc33fccab33.tar.bz2 rails-3ca504c966b8cf3ad51cdccd3377efc33fccab33.zip |
Removed remaining old generators files.
Diffstat (limited to 'railties/lib/rails_generator/simple_logger.rb')
-rw-r--r-- | railties/lib/rails_generator/simple_logger.rb | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/railties/lib/rails_generator/simple_logger.rb b/railties/lib/rails_generator/simple_logger.rb deleted file mode 100644 index d750f07b84..0000000000 --- a/railties/lib/rails_generator/simple_logger.rb +++ /dev/null @@ -1,46 +0,0 @@ -module Rails - module Generator - class SimpleLogger # :nodoc: - attr_reader :out - attr_accessor :quiet - - def initialize(out = $stdout) - @out = out - @quiet = false - @level = 0 - end - - def log(status, message, &block) - @out.print("%12s %s%s\n" % [status, ' ' * @level, message]) unless quiet - indent(&block) if block_given? - end - - def indent(&block) - @level += 1 - if block_given? - begin - block.call - ensure - outdent - end - end - end - - def outdent - @level -= 1 - if block_given? - begin - block.call - ensure - indent - end - end - end - - private - def method_missing(method, *args, &block) - log(method.to_s, args.first, &block) - end - end - end -end |