Class: Punchblock::Event::Joined

Inherits:
Punchblock::Event show all
Defined in:
lib/punchblock/event/joined.rb

Instance Attribute Summary

Attributes inherited from RayoNode

#call_id, #client, #component_id, #connection, #original_component

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RayoNode

class_from_registration, #eql?, import, #inspect, register, #source

Class Method Details

.new(options = {}) ⇒ Event::Joined

Create a joined event

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :other_call_id (String, Optional)

    the call ID that was joined

  • :mixer_id (String, Optional)

    the mixer name that was joined

Returns:



15
16
17
18
19
# File 'lib/punchblock/event/joined.rb', line 15

def self.new(options = {})
  super().tap do |new_node|
    options.each_pair { |k,v| new_node.send :"#{k}=", v }
  end
end

Instance Method Details

#inspect_attributesObject

:nodoc:



45
46
47
# File 'lib/punchblock/event/joined.rb', line 45

def inspect_attributes # :nodoc:
  [:other_call_id, :mixer_id] + super
end

#mixer_idString

Returns the mixer name that was joined.

Returns:

  • (String)

    the mixer name that was joined



35
36
37
# File 'lib/punchblock/event/joined.rb', line 35

def mixer_id
  read_attr :'mixer-id'
end

#mixer_id=(other) ⇒ Object

Parameters:

  • other (String)

    the mixer name that was joined



41
42
43
# File 'lib/punchblock/event/joined.rb', line 41

def mixer_id=(other)
  write_attr :'mixer-id', other
end

#other_call_idString

Returns the call ID that was joined.

Returns:

  • (String)

    the call ID that was joined



23
24
25
# File 'lib/punchblock/event/joined.rb', line 23

def other_call_id
  read_attr :'call-id'
end

#other_call_id=(other) ⇒ Object

Parameters:

  • other (String)

    the call ID that was joined



29
30
31
# File 'lib/punchblock/event/joined.rb', line 29

def other_call_id=(other)
  write_attr :'call-id', other
end