Class: JabberAdmin::Commands::CreateRoomWithOpts

Inherits:
Object
  • Object
show all
Defined in:
lib/jabber_admin/commands/create_room_with_opts.rb

Overview

Create a new room (MUC) with additional options.

Class Method Summary collapse

Class Method Details

.call(callable, room:, host:, **options) ⇒ Object

Pass the correct data to the given callable.



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/jabber_admin/commands/create_room_with_opts.rb', line 15

def self.call(callable, room:, host:, **options)
  name, service = room.split('@')
  options = options.map do |key, value|
    Hash['name', key.to_s, 'value', value.to_s]
  end

  callable.call('create_room_with_opts',
                name: name,
                service: service,
                host: host,
                options: options)
end