Class: Smess::Output
- Inherits:
-
Object
- Object
- Smess::Output
- Defined in:
- lib/smess/output.rb
Direct Known Subclasses
Auto, Clickatell, HttpBase, Test, Twilio
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#sms ⇒ Object
Returns the value of attribute sms.
Instance Method Summary collapse
- #check(code) ⇒ Object
-
#deliver ⇒ Object
entry point to the sms delivery process.
-
#initialize(config) ⇒ Output
constructor
A new instance of Output.
- #send_feedback(_message_sid) ⇒ Object
-
#validate_config ⇒ Object
should be used to make a reasonable validation that the configuration provided is good.
-
#verify(using: 'none') ⇒ Object
entry point to the verification process.
Constructor Details
#initialize(config) ⇒ Output
Returns a new instance of Output.
7 8 9 10 |
# File 'lib/smess/output.rb', line 7 def initialize(config) @config = config validate_config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
5 6 7 |
# File 'lib/smess/output.rb', line 5 def config @config end |
#sms ⇒ Object
Returns the value of attribute sms.
4 5 6 |
# File 'lib/smess/output.rb', line 4 def sms @sms end |
Instance Method Details
#check(code) ⇒ Object
26 27 28 |
# File 'lib/smess/output.rb', line 26 def check(code) raise NoMethodError.new("Verify API is not supported by this Smess output") end |
#deliver ⇒ Object
entry point to the sms delivery process.
18 19 20 |
# File 'lib/smess/output.rb', line 18 def deliver raise NoMethodError.new("You must define deliver in your Smess output class") end |
#send_feedback(_message_sid) ⇒ Object
30 31 32 |
# File 'lib/smess/output.rb', line 30 def send_feedback() nil end |
#validate_config ⇒ Object
should be used to make a reasonable validation that the configuration provided is good.
13 14 15 |
# File 'lib/smess/output.rb', line 13 def validate_config raise NoMethodError.new("You must define validate_config in your Smess output class") end |
#verify(using: 'none') ⇒ Object
entry point to the verification process.
23 24 25 |
# File 'lib/smess/output.rb', line 23 def verify(using: 'none') raise NoMethodError.new("Verify API is not supported by this Smess output") end |