Sha256: 355960baa386c9cf97fd590a08680107b133fc5bed011c0460eaf829c53c970d
Contents?: true
Size: 602 Bytes
Versions: 15
Compression:
Stored size: 602 Bytes
Contents
class Radiosonde::DSL::ComparisonOperator ALIASES = { 'GreaterThanOrEqualToThreshold' => '>=', 'GreaterThanThreshold' => '>', 'LessThanThreshold' => '<', 'LessThanOrEqualToThreshold' => '<=', } class << self def conv_to_alias(operator) ALIASES[operator] || operator end def valid?(operator) ALIASES.keys.include?(operator) or ALIASES.values.include?(operator) end def normalize(operator) (ALIASES.respond_to?(:key) ? ALIASES.key(operator) : ALIASES.index(operator)) || operator end end # of class methods end
Version data entries
15 entries across 15 versions & 1 rubygems