Class: Smess::GlobalMouth

Inherits:
HttpBase show all
Defined in:
lib/smess/outputs/global_mouth.rb

Instance Attribute Summary collapse

Attributes inherited from Output

#config, #sms

Instance Method Summary collapse

Methods inherited from HttpBase

#initialize

Methods included from Logging

#logger

Methods inherited from Output

#check, #initialize, #send_feedback, #verify

Constructor Details

This class inherits a constructor from Smess::HttpBase

Instance Attribute Details

#passwordObject

Returns the value of attribute password.



13
14
15
# File 'lib/smess/outputs/global_mouth.rb', line 13

def password
  @password
end

#sender_idObject

Returns the value of attribute sender_id.



13
14
15
# File 'lib/smess/outputs/global_mouth.rb', line 13

def sender_id
  @sender_id
end

#username=(value) ⇒ Object

Sets the attribute username

Parameters:

  • value

    the value to set the attribute username to.



13
14
15
# File 'lib/smess/outputs/global_mouth.rb', line 13

def username=(value)
  @username = value
end

Instance Method Details

#deliverObject



7
8
9
10
11
# File 'lib/smess/outputs/global_mouth.rb', line 7

def deliver
  generate_mac_hash
  request.url = "#{url}?#{params.to_query}"
  http_get request
end

#validate_configObject



14
15
16
17
18
# File 'lib/smess/outputs/global_mouth.rb', line 14

def validate_config
  @username  = config.fetch(:username)
  @password  = config.fetch(:password)
  @sender_id = config.fetch(:sender_id)
end