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:



16
17
18
# File 'lib/eac_cli/config/entry.rb', line 16

def config
  root_node
end

#secret_valueObject



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

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

#valueObject?

Returns:



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

def value
  sub_entry.found? ? sub_value_to_return : nil
end

#value!Object



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

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

  input_value
end