Module: Toggle::Parser
- Defined in:
- lib/toggle/parser.rb,
lib/toggle/parser/yaml.rb
Defined Under Namespace
Classes: ParserNotFound, YAML
Class Method Summary collapse
Class Method Details
.for(type) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/toggle/parser.rb', line 5 def self.for type case type.to_s.downcase when 'yaml', 'yml' require 'toggle/parser/yaml' ::Toggle::Parser::YAML.new else raise ParserNotFound, <<-EOS #{type} is not currently implemented. You should write it! EOS end end |