class Lithic::Internal::Type::IOLike
Either ‘Pathname` or `StringIO`.
@abstract
@api private
def self.==(other) = other.is_a?(Class) && other <= Lithic::Internal::Type::IOLike
-
(Boolean)
-
Parameters:
-
other
(Object
) --
Other tags:
- Api: - public
def self.==(other) = other.is_a?(Class) && other <= Lithic::Internal::Type::IOLike
def self.===(other)
-
(Boolean)
-
Parameters:
-
other
(Object
) --
Other tags:
- Api: - public
def self.===(other) case other in StringIO | Pathname | IO true else false end end
def coerce(value, state:)
-
(StringIO, Object)
-
Options Hash:
(**state)
-
:branched
(Integer
) -- -
:exactness
(Hash{Symbol=>Object}
) -- -
:strictness
(Boolean, :strong
) --
Parameters:
-
state
(Hash{Symbol=>Object}
) -- . -
value
(StringIO, String, Object
) --
Other tags:
- Api: - private
def coerce(value, state:) exactness = state.fetch(:exactness) case value in String exactness[:yes] += 1 StringIO.new(value) in StringIO exactness[:yes] += 1 value else exactness[:no] += 1 value end end