Class: LiveKit::SIPGrant
- Inherits:
-
Object
- Object
- LiveKit::SIPGrant
- Defined in:
- lib/livekit/grants.rb
Instance Attribute Summary collapse
-
#admin ⇒ Object
Returns the value of attribute admin.
-
#call ⇒ Object
Returns the value of attribute call.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(admin: nil, call: nil) ⇒ SIPGrant
constructor
A new instance of SIPGrant.
- #to_hash ⇒ Object
Constructor Details
#initialize(admin: nil, call: nil) ⇒ SIPGrant
Returns a new instance of SIPGrant.
154 155 156 157 158 159 160 161 162 |
# File 'lib/livekit/grants.rb', line 154 def initialize( # true if can access SIP features admin: nil, # true if can make outgoing call call: nil ) @admin = admin @call = call end |
Instance Attribute Details
#admin ⇒ Object
Returns the value of attribute admin.
152 153 154 |
# File 'lib/livekit/grants.rb', line 152 def admin @admin end |
#call ⇒ Object
Returns the value of attribute call.
152 153 154 |
# File 'lib/livekit/grants.rb', line 152 def call @call end |
Class Method Details
Instance Method Details
#to_hash ⇒ Object
175 176 177 178 179 180 181 182 183 184 |
# File 'lib/livekit/grants.rb', line 175 def to_hash hash = {} instance_variables.each { |var| val = instance_variable_get(var) if val != nil hash[var.to_s.delete("@")] = val end } hash end |