Module: OnSIP::ClassMethods
- Included in:
- OnSIP
- Defined in:
- lib/onsip.rb
Instance Attribute Summary collapse
- #logger ⇒ Object
-
#session ⇒ Object
Returns the value of attribute session.
Instance Method Summary collapse
- #auth!(username, password) ⇒ Object
- #connect(uri, options = {}) ⇒ Object
- #connection ⇒ Object
- #init_logger ⇒ Object
- #options ⇒ Object
Instance Attribute Details
#logger ⇒ Object
27 28 29 |
# File 'lib/onsip.rb', line 27 def logger @logger ||= init_logger end |
#session ⇒ Object
Returns the value of attribute session.
24 25 26 |
# File 'lib/onsip.rb', line 24 def session @session end |
Instance Method Details
#auth!(username, password) ⇒ Object
51 52 53 |
# File 'lib/onsip.rb', line 51 def auth!(username, password) @session = Session.create(username, password) end |
#connect(uri, options = {}) ⇒ Object
38 39 40 41 |
# File 'lib/onsip.rb', line 38 def connect(uri, = {}) @options = Hashie::Mash.new @connection = Connection.new(:uri => uri) end |
#connection ⇒ Object
43 44 45 |
# File 'lib/onsip.rb', line 43 def connection @connection end |
#init_logger ⇒ Object
31 32 33 34 35 36 |
# File 'lib/onsip.rb', line 31 def init_logger @logger = Logger.new(STDOUT) @logger.level = Logger::DEBUG @logger end |
#options ⇒ Object
47 48 49 |
# File 'lib/onsip.rb', line 47 def @options end |