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.



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

def initialize(options = {})
  super

  self.as_env = options[:as_env]
end

Instance Method Details

#callObject



14
15
16
# File 'lib/chamber/commands/show.rb', line 14

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