module Spine::Parameters::Syntax::List
Public Instance Methods
list(name, options = {}, &block)
click to toggle source
# File lib/spine/parameters/syntax/list.rb, line 5 def list(name, options = {}, &block) parse(name, Parsers::List.new(list_parser(options[:type])), &block) rescue ArgumentError add_error(name, 'is not a list.') self end
Private Instance Methods
list_parser(type)
click to toggle source
# File lib/spine/parameters/syntax/list.rb, line 14 def list_parser(type) Parsers::ALL.fetch(type, Parsers::Anything) end