Class: FPM::Fry::UI
- Inherits:
-
Struct
- Object
- Struct
- FPM::Fry::UI
- Defined in:
- lib/fpm/fry/ui.rb
Instance Attribute Summary collapse
-
#err ⇒ Object
Returns the value of attribute err.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#out ⇒ Object
Returns the value of attribute out.
-
#tmpdir ⇒ Object
Returns the value of attribute tmpdir.
Instance Method Summary collapse
-
#initialize(out: STDOUT, err: STDERR, logger: nil, tmpdir: '/tmp/fpm-fry') ⇒ UI
constructor
A new instance of UI.
Constructor Details
#initialize(out: STDOUT, err: STDERR, logger: nil, tmpdir: '/tmp/fpm-fry') ⇒ UI
Returns a new instance of UI.
6 7 8 9 10 |
# File 'lib/fpm/fry/ui.rb', line 6 def initialize( out: STDOUT, err: STDERR, logger: nil , tmpdir: '/tmp/fpm-fry' ) logger ||= Channel.new.tap{|chan| chan.subscribe(Cabin::NiceOutput.new(out)) } FileUtils.mkdir_p( tmpdir ) super( out, err, logger, tmpdir ) end |
Instance Attribute Details
#err ⇒ Object
Returns the value of attribute err
4 5 6 |
# File 'lib/fpm/fry/ui.rb', line 4 def err @err end |
#logger ⇒ Object
Returns the value of attribute logger
4 5 6 |
# File 'lib/fpm/fry/ui.rb', line 4 def logger @logger end |
#out ⇒ Object
Returns the value of attribute out
4 5 6 |
# File 'lib/fpm/fry/ui.rb', line 4 def out @out end |
#tmpdir ⇒ Object
Returns the value of attribute tmpdir
4 5 6 |
# File 'lib/fpm/fry/ui.rb', line 4 def tmpdir @tmpdir end |