Class: BigbluebuttonRails::Configuration
- Inherits:
-
Object
- Object
- BigbluebuttonRails::Configuration
- Defined in:
- lib/bigbluebutton_rails/configuration.rb
Instance Attribute Summary collapse
-
#controllers ⇒ Object
Returns the value of attribute controllers.
-
#get_dynamic_metadata ⇒ Object
Returns the value of attribute get_dynamic_metadata.
-
#get_invitation_url ⇒ Object
Returns the value of attribute get_invitation_url.
-
#guest_support ⇒ Object
Returns the value of attribute guest_support.
-
#match_room_recording ⇒ Object
Returns the value of attribute match_room_recording.
-
#metadata_invalid_keys ⇒ Object
Returns the value of attribute metadata_invalid_keys.
-
#metadata_invitation_url ⇒ Object
Returns the value of attribute metadata_invitation_url.
-
#metadata_room_id ⇒ Object
Returns the value of attribute metadata_room_id.
-
#metadata_user_id ⇒ Object
Returns the value of attribute metadata_user_id.
-
#metadata_user_name ⇒ Object
Returns the value of attribute metadata_user_name.
-
#routing_scope ⇒ Object
Returns the value of attribute routing_scope.
-
#select_server ⇒ Object
methods.
-
#use_local_voice_bridges ⇒ Object
Returns the value of attribute use_local_voice_bridges.
-
#user_attr_id ⇒ Object
Returns the value of attribute user_attr_id.
-
#user_attr_name ⇒ Object
Returns the value of attribute user_attr_name.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #set_controllers(options) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 21 def initialize @controllers = { servers: 'bigbluebutton/servers', rooms: 'bigbluebutton/rooms', recordings: 'bigbluebutton/recordings', playback_types: 'bigbluebutton/playback_types' } @routing_scope = 'bigbluebutton' @metadata_room_id = :'bbbrails-room-id' @metadata_user_id = :'bbbrails-user-id' @metadata_user_name = :'bbbrails-user-name' @metadata_invitation_url = :'invitation-url' @metadata_invalid_keys = [ @metadata_room_id, @metadata_user_id, @metadata_user_name, @metadata_invitation_url ] @user_attr_name = :'name' @user_attr_id = :'id' @use_local_voice_bridges = false @guest_support = false # How to find the room of a recording using the `data` returned by # a `getRecordings`. @match_room_recording = Proc.new do |data, *args| BigbluebuttonRoom.find_by_meetingid(data[:meetingid]) end # Default method to return the invitation URL of a room. By default # returns nil (disable the feature). @get_invitation_url = Proc.new{ |room| nil } # Default method to get the dynamic metadata to use when creating a # conference in a room. @get_dynamic_metadata = Proc.new{ |room| nil } # Selects a server to be used by `room` whenever it needs to make API calls. # By default, if no servers are available an exception is raised. # # This method can be overwritten to change the way the server is selected # before a room is used. `api_method` contains the API method that is being # called. Any server returned here will be used. It *must* return a server, # otherwise the API calls will fail and the code will probably break. # # One good example is to always select a new server when a meeting is being # created (in case `api_method` is `:create`), making this a simple load # balancing tool that can work well in simple cases. @select_server = Proc.new do |room, api_method=nil| room.select_server(api_method) end end |
Instance Attribute Details
#controllers ⇒ Object
Returns the value of attribute controllers.
4 5 6 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 4 def controllers @controllers end |
#get_dynamic_metadata ⇒ Object
Returns the value of attribute get_dynamic_metadata.
19 20 21 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 19 def @get_dynamic_metadata end |
#get_invitation_url ⇒ Object
Returns the value of attribute get_invitation_url.
18 19 20 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 18 def get_invitation_url @get_invitation_url end |
#guest_support ⇒ Object
Returns the value of attribute guest_support.
3 4 5 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 3 def guest_support @guest_support end |
#match_room_recording ⇒ Object
Returns the value of attribute match_room_recording.
17 18 19 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 17 def match_room_recording @match_room_recording end |
#metadata_invalid_keys ⇒ Object
Returns the value of attribute metadata_invalid_keys.
10 11 12 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 10 def @metadata_invalid_keys end |
#metadata_invitation_url ⇒ Object
Returns the value of attribute metadata_invitation_url.
9 10 11 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 9 def @metadata_invitation_url end |
#metadata_room_id ⇒ Object
Returns the value of attribute metadata_room_id.
6 7 8 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 6 def @metadata_room_id end |
#metadata_user_id ⇒ Object
Returns the value of attribute metadata_user_id.
7 8 9 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 7 def @metadata_user_id end |
#metadata_user_name ⇒ Object
Returns the value of attribute metadata_user_name.
8 9 10 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 8 def @metadata_user_name end |
#routing_scope ⇒ Object
Returns the value of attribute routing_scope.
5 6 7 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 5 def routing_scope @routing_scope end |
#select_server ⇒ Object
methods
16 17 18 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 16 def select_server @select_server end |
#use_local_voice_bridges ⇒ Object
Returns the value of attribute use_local_voice_bridges.
13 14 15 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 13 def use_local_voice_bridges @use_local_voice_bridges end |
#user_attr_id ⇒ Object
Returns the value of attribute user_attr_id.
12 13 14 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 12 def user_attr_id @user_attr_id end |
#user_attr_name ⇒ Object
Returns the value of attribute user_attr_name.
11 12 13 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 11 def user_attr_name @user_attr_name end |
Instance Method Details
#set_controllers(options) ⇒ Object
73 74 75 76 77 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 73 def set_controllers() unless .nil? || .empty? @controllers.merge!().slice!(:servers, :rooms, :recordings, :playback_types) end end |