Class: Chamber::Commands::Show
- Defined in:
- lib/chamber/commands/show.rb
Instance Attribute Summary collapse
-
#as_env ⇒ Object
Returns the value of attribute as_env.
-
#only_sensitive ⇒ Object
Returns the value of attribute only_sensitive.
Attributes inherited from Base
#chamber, #dry_run, #rootpath, #shell
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(as_env: nil, only_sensitive: nil, **args) ⇒ Show
constructor
A new instance of Show.
Methods inherited from Base
Constructor Details
#initialize(as_env: nil, only_sensitive: nil, **args) ⇒ Show
Returns a new instance of Show.
12 13 14 15 16 17 |
# File 'lib/chamber/commands/show.rb', line 12 def initialize(as_env: nil, only_sensitive: nil, **args) super(**args) self.as_env = as_env self.only_sensitive = only_sensitive end |
Instance Attribute Details
#as_env ⇒ Object
Returns the value of attribute as_env.
9 10 11 |
# File 'lib/chamber/commands/show.rb', line 9 def as_env @as_env end |
#only_sensitive ⇒ Object
Returns the value of attribute only_sensitive.
9 10 11 |
# File 'lib/chamber/commands/show.rb', line 9 def only_sensitive @only_sensitive end |
Instance Method Details
#call ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/chamber/commands/show.rb', line 19 def call if as_env settings.to_s(pair_separator: "\n") else PP .pp(settings.to_hash, StringIO.new, 60) .string .chomp end end |