Class: WSocketIO::Options

Inherits:
Struct
  • Object
show all
Defined in:
lib/wsocket_io.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(auto_reconnect: true, max_reconnect_attempts: 10, reconnect_delay: 1.0, token: nil, recover: true) ⇒ Options

Returns a new instance of Options.



43
44
45
# File 'lib/wsocket_io.rb', line 43

def initialize(auto_reconnect: true, max_reconnect_attempts: 10, reconnect_delay: 1.0, token: nil, recover: true)
  super
end

Instance Attribute Details

#auto_reconnectObject

Returns the value of attribute auto_reconnect

Returns:

  • the current value of auto_reconnect



42
43
44
# File 'lib/wsocket_io.rb', line 42

def auto_reconnect
  @auto_reconnect
end

#max_reconnect_attemptsObject

Returns the value of attribute max_reconnect_attempts

Returns:

  • the current value of max_reconnect_attempts



42
43
44
# File 'lib/wsocket_io.rb', line 42

def max_reconnect_attempts
  @max_reconnect_attempts
end

#reconnect_delayObject

Returns the value of attribute reconnect_delay

Returns:

  • the current value of reconnect_delay



42
43
44
# File 'lib/wsocket_io.rb', line 42

def reconnect_delay
  @reconnect_delay
end

#recoverObject

Returns the value of attribute recover

Returns:

  • the current value of recover



42
43
44
# File 'lib/wsocket_io.rb', line 42

def recover
  @recover
end

#tokenObject

Returns the value of attribute token

Returns:

  • the current value of token



42
43
44
# File 'lib/wsocket_io.rb', line 42

def token
  @token
end