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.



27
28
29
# File 'lib/async/io/protocol/generic.rb', line 27

def initialize(stream)
	@stream = stream
end

Instance Attribute Details

#streamObject (readonly)

Returns the value of attribute stream.



39
40
41
# File 'lib/async/io/protocol/generic.rb', line 39

def stream
  @stream
end

Instance Method Details

#closeObject



35
36
37
# File 'lib/async/io/protocol/generic.rb', line 35

def close
	@stream.close
end

#closed?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/async/io/protocol/generic.rb', line 31

def closed?
	@stream.closed?
end