Class: EacConfig::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/eac_config/entry.rb

Instance Method Summary collapse

Instance Method Details

#found?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/eac_config/entry.rb', line 13

def found?
  node_entry.if_present(false, &:found?)
end

#found_nodeObject



17
18
19
# File 'lib/eac_config/entry.rb', line 17

def found_node
  node_entry.if_present(&:node)
end

#valueObject



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

def value
  node_entry.if_present(&:value)
end

#value=(a_value) ⇒ Object



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

def value=(a_value)
  write_node.self_entry(path).value = a_value
end

#write_nodeObject



29
30
31
# File 'lib/eac_config/entry.rb', line 29

def write_node
  root_node.write_node || root_node
end