Sha256: b140d90dd63b233eb3760b8958eeb16530e113b90bb191518ede7671aaf462be
Contents?: true
Size: 455 Bytes
Versions: 27
Compression:
Stored size: 455 Bytes
Contents
module Foobara module BuiltinTypes module Array module Casters class Arrayable < Value::Caster def applicable?(value) !value.is_a?(::Array) && value.respond_to?(:to_a) end def applies_message "respond to :to_a" end def cast(object) # TODO: This is probably too lenient object.to_a end end end end end end
Version data entries
27 entries across 27 versions & 1 rubygems