Class: Verify2::Channels::Voice

Inherits:
Object
  • Object
show all
Defined in:
lib/vonage/verify2/channels/voice.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#channelObject

Returns the value of attribute channel.



8
9
10
# File 'lib/vonage/verify2/channels/voice.rb', line 8

def channel
  @channel
end

#toObject

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_hObject



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