Class: Conreality::Session

Inherits:
Object
  • Object
show all
Defined in:
lib/conreality/session.rb

Overview

Represents a Conreality client session.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Session

Returns a new instance of Session.

Parameters:


7
8
9
# File 'lib/conreality/session.rb', line 7

def initialize(client)
  @client = client
end

Instance Method Details

#inspectString

Returns a developer-friendly representation of this session.

Returns:

  • (String)

15
16
17
# File 'lib/conreality/session.rb', line 15

def inspect
  sprintf("#<%s:%#0x>", self.class.name, self.__id__)
end

#start!

This method returns an undefined value.

Starts this session.


23
24
25
# File 'lib/conreality/session.rb', line 23

def start!
  @client.call_proc_with_result(:session_start, cast: :text)
end

#terminate!

This method returns an undefined value.

Terminates this session.


31
32
33
# File 'lib/conreality/session.rb', line 31

def terminate!
  @client.call_proc_with_result(:session_terminate, cast: :text)
end