lib/slackistrano/messaging/base.rb in slackistrano-3.8.1 vs lib/slackistrano/messaging/base.rb in slackistrano-3.8.2

- old
+ new

@@ -8,17 +8,19 @@ include Helpers extend Forwardable def_delegators :env, :fetch - attr_reader :team, :token, :webhook + attr_reader :team, :token, :webhook, :options - def initialize(env: nil, team: nil, channel: nil, token: nil, webhook: nil) - @env = env - @team = team - @channel = channel - @token = token - @webhook = webhook + def initialize(options = {}) + @options = options.dup + + @env = options.delete(:env) + @team = options.delete(:team) + @channel = options.delete(:channel) + @token = options.delete(:token) + @webhook = options.delete(:webhook) end def payload_for_updating { text: "#{deployer} has started deploying branch #{branch} of #{application} to #{stage}"