Class: Simsen::Base
- Inherits:
-
Object
- Object
- Simsen::Base
- Includes:
- ActiveModel::MassAssignmentSecurity, ActiveModel::Validations
- Defined in:
- lib/simsen/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#phone_number ⇒ Object
Returns the value of attribute phone_number.
-
#status ⇒ Object
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
- #deliver ⇒ Object
- #password ⇒ Object
- #sender ⇒ Object
- #testmode ⇒ Object
- #testmode_strategy ⇒ Object
- #url ⇒ Object
- #username ⇒ Object
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
7 8 9 |
# File 'lib/simsen/base.rb', line 7 def @message end |
#phone_number ⇒ Object
Returns the value of attribute phone_number.
7 8 9 |
# File 'lib/simsen/base.rb', line 7 def phone_number @phone_number end |
#status ⇒ Object
Returns the value of attribute status.
7 8 9 |
# File 'lib/simsen/base.rb', line 7 def status @status end |
Class Method Details
.new_sms(message, phone_number) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/simsen/base.rb', line 13 def self.new_sms(, phone_number) gateway = self.new_in_prepared_state gateway. = gateway.phone_number = phone_number gateway end |
Instance Method Details
#deliver ⇒ Object
20 21 22 |
# File 'lib/simsen/base.rb', line 20 def deliver raise(NotImplementedError, 'You must implement #deliver in a class inherited from Simsen::Base to implement sms delivery for the selected SMS-Gateway') end |
#password ⇒ Object
24 25 26 |
# File 'lib/simsen/base.rb', line 24 def password Simsen.password end |
#sender ⇒ Object
28 29 30 |
# File 'lib/simsen/base.rb', line 28 def sender Simsen.sender end |
#testmode ⇒ Object
32 33 34 |
# File 'lib/simsen/base.rb', line 32 def testmode Simsen.testmode end |
#testmode_strategy ⇒ Object
36 37 38 |
# File 'lib/simsen/base.rb', line 36 def testmode_strategy Simsen.testmode_strategy end |
#url ⇒ Object
40 41 42 |
# File 'lib/simsen/base.rb', line 40 def url Simsen.url end |
#username ⇒ Object
44 45 46 |
# File 'lib/simsen/base.rb', line 44 def username Simsen.username end |