Class: Plivo::Token::VoiceGrants
- Inherits:
-
Object
- Object
- Plivo::Token::VoiceGrants
- Defined in:
- lib/plivo/jwt.rb
Instance Attribute Summary collapse
-
#incoming_allow ⇒ Object
readonly
Returns the value of attribute incoming_allow.
-
#outgoing_allow ⇒ Object
readonly
Returns the value of attribute outgoing_allow.
Instance Method Summary collapse
-
#initialize(incoming = nil, outgoing = nil) ⇒ VoiceGrants
constructor
A new instance of VoiceGrants.
- #to_hash ⇒ Object
Constructor Details
#initialize(incoming = nil, outgoing = nil) ⇒ VoiceGrants
Returns a new instance of VoiceGrants.
16 17 18 19 20 21 |
# File 'lib/plivo/jwt.rb', line 16 def initialize(incoming = nil, outgoing = nil) Utils.valid_param?(:incoming, incoming, [TrueClass, FalseClass], false) Utils.valid_param?(:outgoing, outgoing, [TrueClass, FalseClass], false) @incoming_allow = incoming @outgoing_allow = outgoing end |
Instance Attribute Details
#incoming_allow ⇒ Object (readonly)
Returns the value of attribute incoming_allow.
14 15 16 |
# File 'lib/plivo/jwt.rb', line 14 def incoming_allow @incoming_allow end |
#outgoing_allow ⇒ Object (readonly)
Returns the value of attribute outgoing_allow.
14 15 16 |
# File 'lib/plivo/jwt.rb', line 14 def outgoing_allow @outgoing_allow end |
Instance Method Details
#to_hash ⇒ Object
23 24 25 26 27 |
# File 'lib/plivo/jwt.rb', line 23 def to_hash hash = {} instance_variables.each { |var| hash[var.to_s.delete('@')] = instance_variable_get(var) } hash end |