Class: RuVim::Stream
- Inherits:
-
Object
- Object
- RuVim::Stream
- Defined in:
- lib/ruvim/stream.rb
Defined Under Namespace
Classes: FileLoad, Follow, Git, Run, Stdin
Instance Attribute Summary collapse
-
#state ⇒ Object
Returns the value of attribute state.
-
#stop_handler ⇒ Object
readonly
Returns the value of attribute stop_handler.
Instance Method Summary collapse
- #command ⇒ Object
-
#initialize(stop_handler: nil) ⇒ Stream
constructor
A new instance of Stream.
- #live? ⇒ Boolean
- #status ⇒ Object
- #stop! ⇒ Object
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
#state ⇒ Object
Returns the value of attribute state.
5 6 7 |
# File 'lib/ruvim/stream.rb', line 5 def state @state end |
#stop_handler ⇒ Object (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
#command ⇒ Object
21 22 23 |
# File 'lib/ruvim/stream.rb', line 21 def command nil end |
#live? ⇒ Boolean
13 14 15 |
# File 'lib/ruvim/stream.rb', line 13 def live? @state == :live end |
#status ⇒ Object
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 |