Class: Verify2::Channels::Voice
- Inherits:
-
Object
- Object
- Verify2::Channels::Voice
- Defined in:
- lib/vonage/verify2/channels/voice.rb
Instance Attribute Summary collapse
-
#channel ⇒ Object
readonly
Returns the value of attribute channel.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
-
#initialize(to:) ⇒ Voice
constructor
A new instance of Voice.
- #to_h ⇒ Object
Constructor Details
#initialize(to:) ⇒ Voice
Returns a new instance of Voice.
10 11 12 13 |
# File 'lib/vonage/verify2/channels/voice.rb', line 10 def initialize(to:) self.channel = 'voice' self.to = to end |
Instance Attribute Details
#channel ⇒ Object
Returns the value of attribute channel.
8 9 10 |
# File 'lib/vonage/verify2/channels/voice.rb', line 8 def channel @channel end |
#to ⇒ Object
Returns the value of attribute to.
8 9 10 |
# File 'lib/vonage/verify2/channels/voice.rb', line 8 def to @to end |
Instance Method Details
#to_h ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/vonage/verify2/channels/voice.rb', line 20 def to_h hash = Hash.new self.instance_variables.each do |ivar| hash[ivar.to_s.delete("@").to_sym] = self.instance_variable_get(ivar) end hash end |