Class: Smess::Smsglobal
- Defined in:
- lib/smess/outputs/smsglobal.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#sender_id ⇒ Object
Returns the value of attribute sender_id.
-
#username ⇒ Object
Returns the value of attribute username.
Attributes inherited from Output
Instance Method Summary collapse
Methods inherited from HttpBase
Methods included from Logging
Methods inherited from Output
#check, #initialize, #send_feedback, #verify
Constructor Details
This class inherits a constructor from Smess::HttpBase
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
14 15 16 |
# File 'lib/smess/outputs/smsglobal.rb', line 14 def password @password end |
#sender_id ⇒ Object
Returns the value of attribute sender_id.
14 15 16 |
# File 'lib/smess/outputs/smsglobal.rb', line 14 def sender_id @sender_id end |
#username ⇒ Object
Returns the value of attribute username.
14 15 16 |
# File 'lib/smess/outputs/smsglobal.rb', line 14 def username @username end |
Instance Method Details
#deliver ⇒ Object
7 8 9 10 11 12 |
# File 'lib/smess/outputs/smsglobal.rb', line 7 def deliver request.url = url request.body = params http_post request end |
#validate_config ⇒ Object
15 16 17 18 19 |
# File 'lib/smess/outputs/smsglobal.rb', line 15 def validate_config @username = config.fetch(:username) @password = config.fetch(:password) @sender_id = config.fetch(:sender_id, Smess.config.default_sender_id) end |