Class: SmsKit::Provider
- Inherits:
-
Object
- Object
- SmsKit::Provider
- Defined in:
- lib/sms_kit/provider.rb
Direct Known Subclasses
Constant Summary
Constants included from HTTP
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
Class Method Summary collapse
Instance Method Summary collapse
- #deliver(options = {}) ⇒ Object
-
#initialize(options = {}) {|_self| ... } ⇒ Provider
constructor
A new instance of Provider.
Methods included from HTTP
#connection, #get, #post, #uri
Methods included from Config
Constructor Details
#initialize(options = {}) {|_self| ... } ⇒ Provider
Returns a new instance of Provider.
16 17 18 19 |
# File 'lib/sms_kit/provider.rb', line 16 def initialize = {}, &block @data = yield self if block_given? end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
9 10 11 |
# File 'lib/sms_kit/provider.rb', line 9 def data @data end |
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
9 10 11 |
# File 'lib/sms_kit/provider.rb', line 9 def error_code @error_code end |
#error_message ⇒ Object (readonly)
Returns the value of attribute error_message.
9 10 11 |
# File 'lib/sms_kit/provider.rb', line 9 def @error_message end |
Class Method Details
.deliver(options = {}, &block) ⇒ Object
11 12 13 14 |
# File 'lib/sms_kit/provider.rb', line 11 def self.deliver = {}, &block = .to_sms if .respond_to? :to_sms new(, &block).deliver end |
Instance Method Details
#deliver(options = {}) ⇒ Object
21 22 23 |
# File 'lib/sms_kit/provider.rb', line 21 def deliver = {} raise "#{self.class.name} needs to implement #deliver" end |