Sha256: 9a24edeb61749b44f35ed733b2063d326f6a86b0e59fa0eb4fc6c46f7cded846
Contents?: true
Size: 581 Bytes
Versions: 15
Compression:
Stored size: 581 Bytes
Contents
class Radiosonde::DSL::Statistic ALIASES = { 'SampleCount' => :sample_count, 'Average' => :average, 'Sum' => :sum, 'Minimum' => :minimum, 'Maximum' => :maximum, } class << self def conv_to_alias(statistic) ALIASES[statistic] || statistic end def valid?(statistic) ALIASES.keys.include?(statistic) or ALIASES.values.include?(statistic) end def normalize(statistic) (ALIASES.respond_to?(:key) ? ALIASES.key(statistic) : ALIASES.index(statistic)) || statistic end end # of class methods end
Version data entries
15 entries across 15 versions & 1 rubygems