Class: SlackRubyBot::Hooks::Hello
- Inherits:
-
Object
- Object
- SlackRubyBot::Hooks::Hello
- Defined in:
- lib/slack-ruby-bot/hooks/hello.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
- #call(client, _data) ⇒ Object
-
#initialize(logger) ⇒ Hello
constructor
A new instance of Hello.
Constructor Details
#initialize(logger) ⇒ Hello
Returns a new instance of Hello.
6 7 8 |
# File 'lib/slack-ruby-bot/hooks/hello.rb', line 6 def initialize(logger) self.logger = logger end |
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
4 5 6 |
# File 'lib/slack-ruby-bot/hooks/hello.rb', line 4 def logger @logger end |
Instance Method Details
#call(client, _data) ⇒ Object
10 11 12 13 |
# File 'lib/slack-ruby-bot/hooks/hello.rb', line 10 def call(client, _data) return unless client && client.team logger.info "Successfully connected to https://#{client.team.domain}.slack.com." end |