class TivoHMO::Adapters::Settings::KeyContainer
A Container for config keys
Public Class Methods
new(key)
click to toggle source
Calls superclass method
TivoHMO::API::Container::new
# File lib/tivohmo/adapters/settings/key_container.rb, line 11 def initialize(key) super(key) self.presorted = true end
Public Instance Methods
children()
click to toggle source
Calls superclass method
# File lib/tivohmo/adapters/settings/key_container.rb, line 16 def children synchronize do if super.blank? spec = Config.instance.known_config[identifier] add_child(DisplayItem.new("Help", spec[:description])) add_child(DisplayItem.new("Default Value: #{spec[:default_value]}")) val = Config.instance.get(identifier) add_child(DisplayItem.new("Current Value: #{!!val}")) add_child(SetValueItem.new(identifier, !val)) end end super end