Class: LittleSMS

Inherits:
Object
  • Object
show all
Defined in:
lib/little_sms.rb,
lib/little_sms/responce.rb,
lib/little_sms/component.rb,
lib/little_sms/little_sms.rb

Defined Under Namespace

Classes: Component, Responce

Class Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_user, api_key, &block) ⇒ LittleSMS

Returns a new instance of LittleSMS.



8
9
10
11
12
# File 'lib/little_sms/little_sms.rb', line 8

def initialize(api_user, api_key, &block)
  @api_user, @api_key = api_user, api_key
  @components = {}
  self.instance_eval &block if block_given?
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



14
15
16
# File 'lib/little_sms/little_sms.rb', line 14

def method_missing(name, *args)
  @components[name] ||= Component.new(name, @api_user, @api_key)
end

Class Attribute Details

.use_sslObject

Returns the value of attribute use_ssl.



3
4
5
# File 'lib/little_sms/little_sms.rb', line 3

def use_ssl
  @use_ssl
end