Class: SlackRubyBot::Hooks::Hello

Inherits:
Object
  • Object
show all
Defined in:
lib/slack-ruby-bot/hooks/hello.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#loggerObject

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