module Castaway::Interpolation
Public Class Methods
_lookup_by_class(options)
click to toggle source
# File lib/castaway/interpolation.rb, line 10 def self._lookup_by_class(options) options[:interpolator] end
_lookup_by_type(options)
click to toggle source
# File lib/castaway/interpolation.rb, line 14 def self._lookup_by_type(options) case options[:type] when :linear, nil then Castaway::Interpolation::Linear end end
lookup(options)
click to toggle source
# File lib/castaway/interpolation.rb, line 4 def self.lookup(options) _lookup_by_class(options) || _lookup_by_type(options) || raise(ArgumentError, "cannot find interpolation for #{value.inspect}") end