Module: Squire::Parser
- Defined in:
- lib/squire/parser.rb,
lib/squire/parser/hash.rb,
lib/squire/parser/yaml.rb
Defined Under Namespace
Class Method Summary collapse
-
.of(type) ⇒ Object
Creates parser based on provided
type
.
Class Method Details
.of(type) ⇒ Object
Creates parser based on provided type
.
5 6 7 8 9 10 11 |
# File 'lib/squire/parser.rb', line 5 def self.of(type) case type when :hash then Hash when :yaml, :yml then YAML else raise Squire::UndefinedParserError.new("Undefined parser for #{type}.") end end |