Sha256: 805e310360bcb091c5f27fbac52332fcb15323757365ff55302c26b8c00d1f3b
Contents?: true
Size: 1.17 KB
Versions: 8
Compression:
Stored size: 1.17 KB
Contents
module Picky module Wrappers module Bundle # A location calculation recalculates a location to the Picky internal location. # class Location < Calculation def initialize bundle, options = {} super bundle precision = options[:precision] || 1 user_grid = options[:grid] || raise("Gridsize needs to be given for location #{bundle.identifier}.") @calculation = Calculations::Location.new user_grid, precision end # # def recalculate float @calculation.recalculate float end # # def load # Load first the bundle, then extract the config. # bundle.load minimum = bundle[:location_minimum] && bundle[:location_minimum].to_f || raise("Configuration :location_minimum for #{bundle.identifier} missing. Did you run rake index already?") @calculation.minimum = minimum end # Do not generate a partial. # def generate_partial_from unimportant # Nothing. end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems