Module: CMDx::Coercions::String

Extended by:
String
Included in:
String
Defined in:
lib/cmdx/coercions/string.rb

Overview

Coerces to String via ‘Kernel#String`. Never fails for normal objects.

Instance Method Summary collapse

Instance Method Details

#call(value, options = EMPTY_HASH) ⇒ String

Parameters:

  • value (Object)
  • options (Hash{Symbol => Object}) (defaults to: EMPTY_HASH)

Options Hash (options):

  • reserved (Object)

    for future per-coercion configuration (currently ignored)

Returns:



14
15
16
# File 'lib/cmdx/coercions/string.rb', line 14

def call(value, options = EMPTY_HASH)
  String(value)
end