Class: SmsGate::Base
- Inherits:
-
Object
- Object
- SmsGate::Base
- Defined in:
- lib/sms_gate/base.rb,
lib/sms_gate/adapters/test.rb
Class Attribute Summary collapse
-
.adapter ⇒ Object
Returns the value of attribute adapter.
-
.async_response_hooks ⇒ Object
Returns the value of attribute async_response_hooks.
-
.deliveries ⇒ Object
Returns the value of attribute deliveries.
-
.from ⇒ Object
Returns the value of attribute from.
-
.password ⇒ Object
Returns the value of attribute password.
-
.user ⇒ Object
Returns the value of attribute user.
Class Method Summary collapse
- .config ⇒ Object
- .config=(options) ⇒ Object
- .configure {|_self| ... } ⇒ Object
- .deliver(options) ⇒ Object
- .deliver_later(text, to, from = Base.config[:from], model_id = -1)) ⇒ Object
Class Attribute Details
.adapter ⇒ Object
Returns the value of attribute adapter.
7 8 9 |
# File 'lib/sms_gate/base.rb', line 7 def adapter @adapter end |
.async_response_hooks ⇒ Object
Returns the value of attribute async_response_hooks.
6 7 8 |
# File 'lib/sms_gate/base.rb', line 6 def async_response_hooks @async_response_hooks end |
.deliveries ⇒ Object
Returns the value of attribute deliveries.
5 6 7 |
# File 'lib/sms_gate/adapters/test.rb', line 5 def deliveries @deliveries end |
.from ⇒ Object
Returns the value of attribute from.
6 7 8 |
# File 'lib/sms_gate/base.rb', line 6 def from @from end |
.password ⇒ Object
Returns the value of attribute password.
6 7 8 |
# File 'lib/sms_gate/base.rb', line 6 def password @password end |
.user ⇒ Object
Returns the value of attribute user.
6 7 8 |
# File 'lib/sms_gate/base.rb', line 6 def user @user end |
Class Method Details
.config ⇒ Object
19 20 21 |
# File 'lib/sms_gate/base.rb', line 19 def config @config end |
.config=(options) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/sms_gate/base.rb', line 23 def config=() @config = adapter = @config.delete(:adapter) @config.each do |k,v| self.send "#{k}=", v end self.adapter = adapter end |
.configure {|_self| ... } ⇒ Object
9 10 11 |
# File 'lib/sms_gate/base.rb', line 9 def configure yield(self) end |