Class: UsageMod::FileInputPlugin

Inherits:
FilePlugin show all
Defined in:
lib/Usage.rb

Instance Attribute Summary

Attributes inherited from ArgumentParserPlugin

#value

Instance Method Summary collapse

Methods inherited from FilePlugin

#close

Methods inherited from ArgumentParserPlugin

#close

Constructor Details

#initialize(usage_ui, str) ⇒ FileInputPlugin

Returns a new instance of FileInputPlugin.



466
467
468
469
470
471
472
473
# File 'lib/Usage.rb', line 466

def initialize(usage_ui, str)
	$TRACE.debug 5, "trying to open file '#{str}' for input"
	if FileTest.exist?(str) then
		@value = File.open(str)
	else
		raise InvalidInputFilenameError.new(str)
	end
end