Class: FPM::Fry::UI

Inherits:
Struct
  • Object
show all
Defined in:
lib/fpm/fry/ui.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#errObject

Returns the value of attribute err

Returns:

  • (Object)

    the current value of err



4
5
6
# File 'lib/fpm/fry/ui.rb', line 4

def err
  @err
end

#loggerObject

Returns the value of attribute logger

Returns:

  • (Object)

    the current value of logger



4
5
6
# File 'lib/fpm/fry/ui.rb', line 4

def logger
  @logger
end

#outObject

Returns the value of attribute out

Returns:

  • (Object)

    the current value of out



4
5
6
# File 'lib/fpm/fry/ui.rb', line 4

def out
  @out
end

#tmpdirObject

Returns the value of attribute tmpdir

Returns:

  • (Object)

    the current value of tmpdir



4
5
6
# File 'lib/fpm/fry/ui.rb', line 4

def tmpdir
  @tmpdir
end