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



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

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

#valueObject?

Returns:



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

def value
  sub_entry.found? ? sub_value_to_return : nil
end

#value!Object



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

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

  input_value
end