Class: RunFactory
- Inherits:
-
Object
- Object
- RunFactory
- Defined in:
- app/runners_factory.rb
Constant Summary collapse
- TYPES =
{ html: HTMLParser, javascript: JAVASCRIPTParser, ruby: RubyParser }
Class Method Summary collapse
Class Method Details
.for(mode) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/runners_factory.rb', line 13 def self.for(mode) type_c = mode && TYPES[mode.to_sym] if type_c.nil? raise "Invalid mode selection" else return type_c.new end end |
.list_types ⇒ Object
9 10 11 |
# File 'app/runners_factory.rb', line 9 def self.list_types TYPES.keys end |