class Capistrano::Slacky::Facade::Body

Attributes

env[R]

Public Class Methods

new(env:) click to toggle source
Calls superclass method Capistrano::Slacky::Block::Section::new
# File lib/capistrano/slacky/facade/body.rb, line 7
def initialize(env:)
  @env = env

  super(
    ::I18n.t("slacky.stage", scope: "capistrano"), "`#{stage}`",
    ::I18n.t("slacky.branch", scope: "capistrano"), "`#{branch}`",
    ::I18n.t("slacky.duration", scope: "capistrano"), "`#{duration}`",
  )
end

Private Instance Methods

branch() click to toggle source
# File lib/capistrano/slacky/facade/body.rb, line 25
def branch
  @branch ||= env.fetch(:branch)
end
duration() click to toggle source
# File lib/capistrano/slacky/facade/body.rb, line 29
def duration
  @duration ||= ::Capistrano::Slacky::Command::Duration.call
end
stage() click to toggle source
# File lib/capistrano/slacky/facade/body.rb, line 21
def stage
  @stage ||= env.fetch(:stage)
end