Class: Sem::Views::EnvVars

Inherits:
Base
  • Object
show all
Defined in:
lib/sem/views/env_vars.rb

Class Method Summary collapse

Methods inherited from Base

org_names_not_matching, print_table

Class Method Details

.list(env_vars) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/sem/views/env_vars.rb', line 3

def self.list(env_vars)
  header = ["ID", "NAME", "ENCRYPTED?", "CONTENT"]

  body = env_vars.map do |var|
    content = var.encrypted? ? "*encrypted*" : var.content

    [var.id, var.name, var.encrypted?, content]
  end

  print_table([header, *body])
end