Class: FileWatch::Tail

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/filewatch/tail.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Tail

Returns a new instance of Tail.



19
20
21
# File 'lib/filewatch/tail.rb', line 19

def initialize(opts = {})
  @target = YieldingTail.new(opts)
end

Instance Attribute Details

#target=(value) ⇒ Object (writeonly)

Sets the attribute target

Parameters:

  • value

    the value to set the attribute target to.



11
12
13
# File 'lib/filewatch/tail.rb', line 11

def target=(value)
  @target = value
end

Class Method Details

.new_observing(opts = {}) ⇒ Object



13
14
15
16
17
# File 'lib/filewatch/tail.rb', line 13

def self.new_observing(opts = {})
  new.tap do |instance|
    instance.target = ObservingTail.new(opts)
  end
end