Class: Rvm2::Ui::Output::Log

Inherits:
Console
  • Object
show all
Defined in:
lib/plugins/rvm2/ui/output/log.rb

Instance Attribute Summary collapse

Attributes inherited from Console

#stderr, #stdout

Instance Method Summary collapse

Methods inherited from Console

#finish, #levels, #log, #progress, #start

Constructor Details

#initialize(rvm2_plugins, file_name, flags = "w") ⇒ Log

Returns a new instance of Log.



8
9
10
11
12
13
# File 'lib/plugins/rvm2/ui/output/log.rb', line 8

def initialize(rvm2_plugins, file_name, flags = "w")
  @rvm2_plugins = rvm2_plugins
  @file_name = file_name
  @file = File.new(@file_name, flags)
  super(@file, @file)
end

Instance Attribute Details

#file_nameObject (readonly)

Returns the value of attribute file_name.



7
8
9
# File 'lib/plugins/rvm2/ui/output/log.rb', line 7

def file_name
  @file_name
end

Instance Method Details

#finalizeObject



14
15
16
# File 'lib/plugins/rvm2/ui/output/log.rb', line 14

def finalize
  @file.close
end