Sha256: aca30bcf8e81fbb058a3ba2910530f289c1cd613dddb37c564eac969481f7ba2

Contents?: true

Size: 306 Bytes

Versions: 19

Compression:

Stored size: 306 Bytes

Contents

module Decanter
  module Parser
    class StringParser < ValueParser
      parser do |val, options|
        raise Decanter::ParseError.new 'Expects a single value' if val.is_a? Array
        next if (val.nil? || val === '')
        next val if val.is_a? String
        val.to_s
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
decanter-4.0.4 lib/decanter/parser/string_parser.rb
decanter-4.0.3 lib/decanter/parser/string_parser.rb
decanter-4.0.2 lib/decanter/parser/string_parser.rb
decanter-4.0.1 lib/decanter/parser/string_parser.rb
decanter-4.0.0 lib/decanter/parser/string_parser.rb
decanter-3.6.0 lib/decanter/parser/string_parser.rb
decanter-3.5.1 lib/decanter/parser/string_parser.rb
decanter-3.5.0 lib/decanter/parser/string_parser.rb
decanter-3.4.2 lib/decanter/parser/string_parser.rb
decanter-3.4.1 lib/decanter/parser/string_parser.rb
decanter-3.4.0 lib/decanter/parser/string_parser.rb
decanter-3.3.0 lib/decanter/parser/string_parser.rb
decanter-3.2.1 lib/decanter/parser/string_parser.rb
decanter-3.2.0 lib/decanter/parser/string_parser.rb
decanter-3.1.2 lib/decanter/parser/string_parser.rb
decanter-3.1.1 lib/decanter/parser/string_parser.rb
decanter-3.1.0 lib/decanter/parser/string_parser.rb
decanter-3.0.1 lib/decanter/parser/string_parser.rb
decanter-3.0.0 lib/decanter/parser/string_parser.rb