Class: Chamber::Commands::Show

Inherits:
Base
  • Object
show all
Defined in:
lib/chamber/commands/show.rb

Instance Method Summary collapse

Methods inherited from Base

call

Constructor Details

#initialize(options = {}) ⇒ Show

Returns a new instance of Show.



7
8
9
10
11
12
# File 'lib/chamber/commands/show.rb', line 7

def initialize(options = {})
  super

  self.as_env         = options[:as_env]
  self.only_sensitive = options[:only_sensitive]
end

Instance Method Details

#callObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/chamber/commands/show.rb', line 14

def call
  if as_env
    settings.to_s(pair_separator: "\n")
  else
    PP.
    pp(settings.to_hash, StringIO.new, 60).
    string.
    chomp
  end
end