class Message::Placeholders

Placeholder

Attributes

placeholders[R]

Public Class Methods

new(placeholders) click to toggle source
# File lib/capistrano/teams/message/placeholders.rb, line 8
def initialize(placeholders)
  @placeholders = defaults.merge(placeholders)
end

Private Instance Methods

defaults() click to toggle source
# File lib/capistrano/teams/message/placeholders.rb, line 14
def defaults
  {
    application: fetch(:application, fetch(:teams_default_application)),
    branch: fetch(:branch, fetch(:teams_default_branch)),
    stage: fetch(:stage, :teams_default_stage),
    user: ENV.fetch('USER', ENV.fetch('USERNAME', :teams_default_user))
  }
end