Sha256: 45cd40d059853d90f20104357677f99d661ab857ceff0de9d5db39c1d0d789a4
Contents?: true
Size: 297 Bytes
Versions: 9
Compression:
Stored size: 297 Bytes
Contents
# frozen_string_literal: true class RubyStringCaster < Sinclair::Caster master_caster! cast_with(NilClass) { 'nil' } cast_with(Symbol) { |value| ":#{value}" } cast_with(String, :to_json) cast_with(Object, :to_s) def self.to_ruby_string(value) cast(value, value.class) end end
Version data entries
9 entries across 9 versions & 1 rubygems