class Extant::Coercers::Base
Constants
- UncoercedValue
Attributes
coerced[RW]
options[RW]
value[RW]
Public Class Methods
coercer_name()
click to toggle source
# File lib/extant/coercers/base.rb, line 5 def self.coercer_name self.name.split("::").last.gsub(/([a-z\d])([A-Z])/,'\1_\2').downcase end
new(value, options={})
click to toggle source
# File lib/extant/coercers/base.rb, line 9 def initialize(value, options={}) self.value = value self.coerced = false self.options = {} end
Public Instance Methods
coerce()
click to toggle source
# File lib/extant/coercers/base.rb, line 15 def coerce rase NotImplementedError.new("#{self.class.name} must implement #{coerce}") end
coerced?()
click to toggle source
# File lib/extant/coercers/base.rb, line 19 def coerced? coerced end