Class: Decanter::Parser::ValueParser
- Inherits:
-
Base
- Object
- Base
- Decanter::Parser::ValueParser
show all
- Defined in:
- lib/decanter/parser/value_parser.rb
Class Method Summary
collapse
Methods included from Core
included
Class Method Details
._parse(name, value, options = {}) ⇒ Object
7
8
9
10
|
# File 'lib/decanter/parser/value_parser.rb', line 7
def self._parse(name, value, options={})
self.validate_singularity(value)
super(name, value, options)
end
|
.validate_singularity(value) ⇒ Object
14
15
16
|
# File 'lib/decanter/parser/value_parser.rb', line 14
def self.validate_singularity(value)
raise Decanter::ParseError.new 'Expects a single value' if value.is_a? Array
end
|