Class: FileWatch::LoopControlResult

Inherits:
Object
  • Object
show all
Defined in:
lib/filewatch/bootstrap.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(count, size, more) ⇒ LoopControlResult

Returns a new instance of LoopControlResult.



49
50
51
52
# File 'lib/filewatch/bootstrap.rb', line 49

def initialize(count, size, more)
  @count, @size, @more = count, size, more
  @read_error_detected = false
end

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count.



47
48
49
# File 'lib/filewatch/bootstrap.rb', line 47

def count
  @count
end

#moreObject (readonly)

Returns the value of attribute more.



47
48
49
# File 'lib/filewatch/bootstrap.rb', line 47

def more
  @more
end

#sizeObject (readonly)

Returns the value of attribute size.



47
48
49
# File 'lib/filewatch/bootstrap.rb', line 47

def size
  @size
end

Instance Method Details

#flag_read_errorObject



54
55
56
# File 'lib/filewatch/bootstrap.rb', line 54

def flag_read_error
  @read_error_detected = true
end

#keep_looping?Boolean

Returns:

  • (Boolean)


58
59
60
# File 'lib/filewatch/bootstrap.rb', line 58

def keep_looping?
  !@read_error_detected && @more
end