Class: Parameters::Types::String Private

Inherits:
Object show all
Defined in:
lib/parameters/types/string.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 0.3.0

Class Method Summary collapse

Methods inherited from Object

#===, ===, to_ruby

Methods inherited from Type

#<, #<=, #==, ===, #===, #coerce, #to_ruby, to_ruby

Class Method Details

.coerce(value) ⇒ ::String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Coerces a value into a String.

Parameters:

  • value (#to_s)

    The value to coerce.

Returns:

  • (::String)

    The coerced String.

Since:

  • 0.3.0



16
17
18
# File 'lib/parameters/types/string.rb', line 16

def self.coerce(value)
  value.to_s
end