Class: Restio::Util::Caster::Generic

Inherits:
Object
  • Object
show all
Defined in:
lib/restio/util/caster/generic.rb

Direct Known Subclasses

Default

Instance Method Summary collapse

Instance Method Details

#cast(value) ⇒ Object



8
9
10
# File 'lib/restio/util/caster/generic.rb', line 8

def cast value
  map(value) || value
end

#map(value) ⇒ Object



5
6
7
# File 'lib/restio/util/caster/generic.rb', line 5

def map value
  raise "Define #{self.class}#map(value)"
end