Class: Config::SimpleFactory

Inherits:
ItemFactory show all
Defined in:
lib/module_config/items/simple.rb

Constant Summary collapse

@@nameregex =
/\w+/
@@valueregex =
/[\w\-,\/\\:.;\t @]*/

Class Method Summary collapse

Methods inherited from ItemFactory

factories, getItemFor, inherited, load

Class Method Details

.create(_str) ⇒ Object



15
16
17
# File 'lib/module_config/items/simple.rb', line 15

def SimpleFactory.create(_str)
    Simple.new(_str, SimpleItem.getRegex(@@nameregex, @@valueregex))
end

.match(_str) ⇒ Object



10
11
12
13
# File 'lib/module_config/items/simple.rb', line 10

def SimpleFactory.match(_str)
    _str.sub!(SimpleItem.getRegex(@@nameregex, @@valueregex), '')
   return $&
end

.priorityObject



19
20
21
# File 'lib/module_config/items/simple.rb', line 19

def SimpleFactory.priority
    10
end