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
28 29 30 |
# File 'lib/onsip.rb', line 28 def logger @logger ||= init_logger end |
#session ⇒ Object
Returns the value of attribute session.
25 26 27 |
# File 'lib/onsip.rb', line 25 def session @session end |
Instance Method Details
#auth!(username, password) ⇒ Object
52 53 54 |
# File 'lib/onsip.rb', line 52 def auth!(username, password) @session = Session.create(username, password) end |
#connect(uri, options = {}) ⇒ Object
39 40 41 42 |
# File 'lib/onsip.rb', line 39 def connect(uri, = {}) @options = Hashie::Mash.new @connection = Connection.new(:uri => uri) end |
#connection ⇒ Object
44 45 46 |
# File 'lib/onsip.rb', line 44 def connection @connection end |
#init_logger ⇒ Object
32 33 34 35 36 37 |
# File 'lib/onsip.rb', line 32 def init_logger @logger = Logger.new(STDOUT) @logger.level = Logger::DEBUG @logger end |
#options ⇒ Object
48 49 50 |
# File 'lib/onsip.rb', line 48 def @options end |