Class: ContainerConfig::Coercer::String

Inherits:
Base
  • Object
show all
Defined in:
lib/container_config/coercer/string.rb

Overview

String type coercer

Instance Method Summary collapse

Instance Method Details

#coerce(value) ⇒ String

Coerces the given value into a string

Parameters:

  • value (Object)

    given value

Returns:



26
27
28
# File 'lib/container_config/coercer/string.rb', line 26

def coerce(value)
  value.to_s
end

#nameObject

See Also:



10
11
12
# File 'lib/container_config/coercer/string.rb', line 10

def name
  "String"
end

#typeObject

See Also:



15
16
17
# File 'lib/container_config/coercer/string.rb', line 15

def type
  :string
end