module Squire::Parser
Public Class Methods
of(type)
click to toggle source
Creates parser based on provided type
.
# 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