Class: Config::SimpleVerbose

Inherits:
SimpleItem show all
Defined in:
lib/module_config/items/simpleverbose.rb

Instance Attribute Summary

Attributes inherited from SimpleItem

#name, #value

Attributes inherited from Item

#priority

Instance Method Summary collapse

Methods inherited from SimpleItem

getRegex, #merge, #print

Methods inherited from Item

#merge, #name, #print, #value

Constructor Details

#initialize(_str, _regex) ⇒ SimpleVerbose

Returns a new instance of SimpleVerbose.



23
24
25
26
27
28
29
30
31
# File 'lib/module_config/items/simpleverbose.rb', line 23

def initialize(_str, _regex)
    super(_str, _regex)
    
    begin
        @value = Integer(@value)
    rescue ArgumentError => e
        raise ConfigWrongFormatException.new(self.class), "Configuration item <#{@name} = #{@value}> has wrong format!"
    end
end