class ClientDocument

Attributes

location[RW]

Public Class Methods

new(client) click to toggle source
# File lib/sinatra/liveviews/page-websocket.rb, line 47
def initialize(client)
        raise 'client must be a WebSocketHelper' unless client.is_a? WebSocketHelper
        @client = client
end

Public Instance Methods

element(selector) click to toggle source
# File lib/sinatra/liveviews/page-websocket.rb, line 52
def element(selector)
        ClientElement.new(selector, @client)
end
on_load() { || ... } click to toggle source
# File lib/sinatra/liveviews/page-websocket.rb, line 56
def on_load
        # maybe later we can do something else with this, but for now
        # just call the load method straight away
        yield()
end