class EventCore::IOSource
Attributes
auto_close[RW]
Public Class Methods
new(io, type)
click to toggle source
Calls superclass method
EventCore::Source::new
# File lib/event_core.rb, line 169 def initialize(io, type) super() raise "Nil IO provided" if io.nil? @io = io @type = type @auto_close = true raise "Invalid select type: #{type}" unless [:read, :write].include?(type) end
Public Instance Methods
close!()
click to toggle source
Calls superclass method
EventCore::Source#close!
# File lib/event_core.rb, line 190 def close! super @io.close if @auto_close and not @io.closed? end
consume_event_data!()
click to toggle source
# File lib/event_core.rb, line 186 def consume_event_data! nil end
select_io()
click to toggle source
# File lib/event_core.rb, line 178 def select_io @io end
select_type()
click to toggle source
# File lib/event_core.rb, line 182 def select_type @type end