module Bashly::Script::Introspection::EnvironmentVariables
Public Instance Methods
Source
# File lib/bashly/script/introspection/environment_variables.rb, line 6 def default_environment_variables environment_variables.select(&:default) end
Returns an array of all the Environment Variables with default values
Source
# File lib/bashly/script/introspection/environment_variables.rb, line 11 def environment_variables return [] unless options['environment_variables'] options['environment_variables'].map do |options| EnvironmentVariable.new options end end
Returns an array of EnvironmentVariable objects
Source
# File lib/bashly/script/introspection/environment_variables.rb, line 20 def public_environment_variables environment_variables.reject(&:private) end
Returns only environment variables that are not private
Source
# File lib/bashly/script/introspection/environment_variables.rb, line 25 def required_environment_variables environment_variables.select(&:required) end
Returns an array of all the required EnvironmentVariables
Source
# File lib/bashly/script/introspection/environment_variables.rb, line 30 def validated_environment_variables environment_variables.select(&:validate?) end
Returns an array of all the environment_variables with a validation
Source
# File lib/bashly/script/introspection/environment_variables.rb, line 36 def visible_environment_variables Settings.private_reveal_key ? environment_variables : public_environment_variables end
Returns only public environment variables, or both public and private environment variables if Settings.private_reveal_key is set
Source
# File lib/bashly/script/introspection/environment_variables.rb, line 41 def whitelisted_environment_variables environment_variables.select(&:allowed) end
Returns an array of all the environment_variables with a whitelist arg