class Riddl::SSEImplementation
Public Class Methods
new(ws)
click to toggle source
# File lib/ruby/riddl/implementation.rb, line 29 def initialize(ws) @ws = ws @r = ws[:r] # the matching resource path @s = ws[:s] # the matching resource path schema @match = ws[:match] # the path of the branch matching, important for recursive @env = ws[:env] # environment (all headers) @a = ws[:a] # args to run command end
Public Instance Methods
close()
click to toggle source
# File lib/ruby/riddl/implementation.rb, line 59 def close @ws[:io].close end
closed?()
click to toggle source
# File lib/ruby/riddl/implementation.rb, line 55 def closed? @ws[:io].closed? end
io()
click to toggle source
# File lib/ruby/riddl/implementation.rb, line 52 def io @ws[:io] end
io=(connection)
click to toggle source
# File lib/ruby/riddl/implementation.rb, line 49 def io=(connection) @ws[:io] = connection end
onclose()
click to toggle source
# File lib/ruby/riddl/implementation.rb, line 39 def onclose;end
onerror(err)
click to toggle source
# File lib/ruby/riddl/implementation.rb, line 40 def onerror(err);end
onopen()
click to toggle source
# File lib/ruby/riddl/implementation.rb, line 38 def onopen;end
send(data)
click to toggle source
# File lib/ruby/riddl/implementation.rb, line 42 def send(data) @ws[:io].send_with_id 'data', data end
send_with_id(id,data)
click to toggle source
# File lib/ruby/riddl/implementation.rb, line 45 def send_with_id(id,data) @ws[:io].send_with_id id, data end