class Snmp2mkr::ConfigTypes::Transformation
Attributes
type[R]
Public Instance Methods
setup(h)
click to toggle source
# File lib/snmp2mkr/config_types/transformation.rb, line 7 def setup(h) raise TypeError, "#{self.class} must be given an Hash" unless h.kind_of?(Hash) @type = h.fetch('type') raise TypeError, "#{self.class} type must be a String" unless @type.kind_of?(String) case @type when 'persec' # do nothing else raise ArgumentError, "#{self.class} doesn't know type #{type.inspect}" end end