Class: RuVim::Stream

Inherits:
Object
  • Object
show all
Defined in:
lib/ruvim/stream.rb

Direct Known Subclasses

FileLoad, Follow, Git, Run, Stdin

Defined Under Namespace

Classes: FileLoad, Follow, Git, Run, Stdin

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stop_handler: nil) ⇒ Stream

Returns a new instance of Stream.



8
9
10
11
# File 'lib/ruvim/stream.rb', line 8

def initialize(stop_handler: nil)
  @state = nil
  @stop_handler = stop_handler
end

Instance Attribute Details

#stateObject

Returns the value of attribute state.



5
6
7
# File 'lib/ruvim/stream.rb', line 5

def state
  @state
end

#stop_handlerObject (readonly)

Returns the value of attribute stop_handler.



6
7
8
# File 'lib/ruvim/stream.rb', line 6

def stop_handler
  @stop_handler
end

Instance Method Details

#commandObject



21
22
23
# File 'lib/ruvim/stream.rb', line 21

def command
  nil
end

#live?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/ruvim/stream.rb', line 13

def live?
  @state == :live
end

#statusObject



17
18
19
# File 'lib/ruvim/stream.rb', line 17

def status
  nil
end

#stop!Object



25
26
27
# File 'lib/ruvim/stream.rb', line 25

def stop!
  # subclasses override
end