Class: Applications

Inherits:
Object
  • Object
show all
Defined in:
lib/coolsms/applications.rb

Direct Known Subclasses

Cancel, Send, Sent, Status

Instance Method Summary collapse

Instance Method Details

#fields(*keys) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/coolsms/applications.rb', line 9

def fields(*keys)
  field = Auth.new.auth
  keys.each do |key|
    if self.class.instance_methods.include? key
      field[key] = self.public_send(key)
    end
  end
  return field
end

#set_fields(options) ⇒ Object



3
4
5
6
7
# File 'lib/coolsms/applications.rb', line 3

def set_fields(options)
  options.each do |key, value|
    self.public_send( "#{key}=", value ) if self.class.instance_methods.include? key
  end
end