Class: EacCli::Config::Entry

Inherits:
EacConfig::NodeEntry
  • Object
show all
Defined in:
lib/eac_cli/config/entry.rb,
lib/eac_cli/config/entry/options.rb,
lib/eac_cli/config/entry/undefined.rb

Defined Under Namespace

Modules: Undefined Classes: Options

Instance Method Summary collapse

Instance Method Details

#configEacCli::Config

Returns:



21
22
23
# File 'lib/eac_cli/config/entry.rb', line 21

def config
  root_node
end

#secret_valueObject



36
37
38
# File 'lib/eac_cli/config/entry.rb', line 36

def secret_value
  self.class.new(config, path, options.to_h.merge(noecho: true).to_h).value
end

#valueObject



25
26
27
# File 'lib/eac_cli/config/entry.rb', line 25

def value
  value!
end

#value!Object



29
30
31
32
33
34
# File 'lib/eac_cli/config/entry.rb', line 29

def value!
  return sub_value_to_return if sub_entry.found?
  return nil unless options.required?

  input_value
end