class Snmp2mkr::ConfigTypes::TemplateCollection
Attributes
value[R]
Public Instance Methods
[](k)
click to toggle source
# File lib/snmp2mkr/config_types/template_collection.rb, line 15 def [](k) @value[k] end
collect_children()
click to toggle source
# File lib/snmp2mkr/config_types/template_collection.rb, line 23 def collect_children @value.values end
fetch(k)
click to toggle source
# File lib/snmp2mkr/config_types/template_collection.rb, line 19 def fetch(k) @value.fetch(k) end
setup(hash)
click to toggle source
# File lib/snmp2mkr/config_types/template_collection.rb, line 7 def setup(hash) if !hash.kind_of?(Hash) || hash.any? { |k,v| !k.kind_of?(String) } raise TypeError, "#{self.class} must be given a Hash<String, Object)>" end @value = hash.map { |k, v| [k, Template.new([k,v])] }.to_h end