Class: EacConfig::Entry
- Inherits:
-
Object
- Object
- EacConfig::Entry
- Defined in:
- lib/eac_config/entry.rb
Instance Method Summary collapse
- #found? ⇒ Boolean
- #found_node ⇒ Object
- #secret_value ⇒ Object
- #to_s ⇒ Object
- #value ⇒ Object
- #value=(a_value) ⇒ Object
- #write_node ⇒ Object
Instance Method Details
#found? ⇒ Boolean
13 14 15 |
# File 'lib/eac_config/entry.rb', line 13 def found? node_entry.if_present(false, &:found?) end |
#found_node ⇒ Object
17 18 19 |
# File 'lib/eac_config/entry.rb', line 17 def found_node node_entry.if_present(&:node) end |
#secret_value ⇒ Object
21 22 23 |
# File 'lib/eac_config/entry.rb', line 21 def secret_value node_entry.if_present(&:secret_value) end |
#to_s ⇒ Object
25 26 27 |
# File 'lib/eac_config/entry.rb', line 25 def to_s "#{self.class}[RootNode: #{root_node}, Path: #{path}]" end |
#value ⇒ Object
29 30 31 |
# File 'lib/eac_config/entry.rb', line 29 def value node_entry.if_present(&:value) end |
#value=(a_value) ⇒ Object
33 34 35 |
# File 'lib/eac_config/entry.rb', line 33 def value=(a_value) write_node.self_entry(path).value = a_value end |
#write_node ⇒ Object
37 38 39 |
# File 'lib/eac_config/entry.rb', line 37 def write_node root_node.write_node || root_node end |