Class: Extant::Coercers::String

Inherits:
Base
  • Object
show all
Defined in:
lib/extant/coercers/string.rb

Constant Summary

Constants inherited from Base

Base::UncoercedValue

Instance Method Summary collapse

Methods inherited from Base

#coerced?, coercer_name, #initialize

Constructor Details

This class inherits a constructor from Extant::Coercers::Base

Instance Method Details

#coerceObject



3
4
5
6
7
8
# File 'lib/extant/coercers/string.rb', line 3

def coerce
  return UncoercedValue if value == nil

  self.coerced = true
  value.to_s
end