Class: Async::IO::Protocol::Generic

Inherits:
Object
  • Object
show all
Defined in:
lib/async/io/protocol/generic.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stream) ⇒ Generic

Returns a new instance of Generic.


29
30
31
# File 'lib/async/io/protocol/generic.rb', line 29

def initialize(stream)
	@stream = stream
end

Instance Attribute Details

#streamObject (readonly)

Returns the value of attribute stream


41
42
43
# File 'lib/async/io/protocol/generic.rb', line 41

def stream
  @stream
end

Instance Method Details

#closeObject


37
38
39
# File 'lib/async/io/protocol/generic.rb', line 37

def close
	@stream.close
end

#closed?Boolean

Returns:

  • (Boolean)

33
34
35
# File 'lib/async/io/protocol/generic.rb', line 33

def closed?
	@stream.closed?
end