Class: Terraspace::Builder::Allow::Env

Inherits:
Base
  • Object
show all
Defined in:
lib/terraspace/builder/allow/env.rb

Instance Method Summary collapse

Methods inherited from Base

#allowed?, #allows, #check!, #denys, #initialize

Methods included from App::CallableOption::Concern

#callable_option

Constructor Details

This class inherits a constructor from Terraspace::Builder::Allow::Base

Instance Method Details

#check_valueObject

interface method



13
14
15
# File 'lib/terraspace/builder/allow/env.rb', line 13

def check_value
  Terraspace.env
end

#messageObject

interface method



4
5
6
7
8
9
10
# File 'lib/terraspace/builder/allow/env.rb', line 4

def message
  messages = []
  messages << "This env is not allowed to be used: TS_ENV=#{Terraspace.env}"
  messages << "Allow envs: #{allows.join(', ')}" if allows
  messages << "Deny envs: #{denys.join(', ')}" if denys
  messages.join("\n")
end