Class: Kris::Session
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize(config) ⇒ Session
constructor
A new instance of Session.
- #start ⇒ Object
Constructor Details
#initialize(config) ⇒ Session
Returns a new instance of Session.
9 10 11 12 13 14 |
# File 'lib/kris/session.rb', line 9 def initialize(config) @logger = Logger.new(STDOUT) @channels = config.fetch(:channels, nil) @plugin_path = config.fetch(:plugin_path, './plugin') super(config) end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
7 8 9 |
# File 'lib/kris/session.rb', line 7 def logger @logger end |
Instance Method Details
#start ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/kris/session.rb', line 16 def start @logger.info('Booting Kris...') run! rescue => e @logger.error(e) ensure part end |