Class: Plivo::Resources::LookupBaseResource
- Inherits:
-
Object
- Object
- Plivo::Resources::LookupBaseResource
show all
- Defined in:
- lib/plivo/resources/lookup.rb
Instance Method Summary
collapse
Constructor Details
6
7
8
9
10
11
12
|
# File 'lib/plivo/resources/lookup.rb', line 6
def initialize(fields = nil)
valid_param?(:fields, fields, Hash, false)
fields.each do |k, v|
instance_variable_set("@#{k}", v)
self.class.send(:attr_reader, k)
end
end
|
Instance Method Details
#to_s ⇒ Object
14
15
16
17
18
|
# File 'lib/plivo/resources/lookup.rb', line 14
def to_s
hash = {}
instance_variables.each { |var| hash[var.to_s.delete("@")] = instance_variable_get(var) }
hash.to_s
end
|