Class: Smsapipl::Connection
- Inherits:
-
Object
- Object
- Smsapipl::Connection
- Defined in:
- lib/smsapipl/connection.rb
Instance Attribute Summary collapse
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
- #connection ⇒ Object
-
#initialize(uri, port) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(uri, port) ⇒ Connection
10 11 12 13 |
# File 'lib/smsapipl/connection.rb', line 10 def initialize(uri, port) @uri = uri @port = port end |
Instance Attribute Details
#port ⇒ Object (readonly)
Returns the value of attribute port.
8 9 10 |
# File 'lib/smsapipl/connection.rb', line 8 def port @port end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
8 9 10 |
# File 'lib/smsapipl/connection.rb', line 8 def uri @uri end |
Instance Method Details
#connection ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/smsapipl/connection.rb', line 15 def connection connection = Net::HTTP.new(uri, port) connection.use_ssl = true connection.verify_mode = OpenSSL::SSL::VERIFY_NONE connection end |