Exception: IO::Tail::ReopenException
- Inherits:
-
TailException
- Object
- Exception
- TailException
- IO::Tail::ReopenException
- Defined in:
- lib/io/tail.rb
Overview
The ReopenException is raised internally if File::Tail gets suspicious something unusual has happend to the tailed file, e. g., it was rotated away. The exception is caught and an attempt to reopen it is made.
Instance Attribute Summary collapse
-
#mode ⇒ Object
readonly
Returns the value of attribute mode.
Instance Method Summary collapse
-
#initialize(mode = :bottom) ⇒ ReopenException
constructor
Creates an ReopenException object.
Constructor Details
#initialize(mode = :bottom) ⇒ ReopenException
Creates an ReopenException object. The mode defaults to :bottom which indicates that the file should be tailed beginning from the end. :top indicates, that it should be tailed from the beginning from the start.
33 34 35 36 |
# File 'lib/io/tail.rb', line 33 def initialize(mode = :bottom) super(self.class.name) @mode = mode end |
Instance Attribute Details
#mode ⇒ Object (readonly)
Returns the value of attribute mode.
26 27 28 |
# File 'lib/io/tail.rb', line 26 def mode @mode end |