Method: NanDoc::Config#file_utils
- Defined in:
- lib/nandoc/core/config.rb
#file_utils ⇒ Object
some FileUtils actions are wrapped with this proxy to allow formatting and customizations from the typical FileUtils actions, to indent and colorize the notice stream sorta like nanoc does
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/nandoc/core/config.rb', line 36 def file_utils @file_utils ||= begin Treebis::FileUtilsProxy.new do |fu| fu.pretty! fu.color?{ NanDoc::Config.colorize? } fu.prefix = ' ' * 6 # like nanoc fu.ui = proc{ $stdout } # it's normally $stderr, it needs to be reference-like # so that capture3 will work! end end end |