Sha256: e5329b7b20d57b965f0cbdd9580dfd324dfdcbe97bcf9f3df67f659e13dbd4b4

Contents?: true

Size: 289 Bytes

Versions: 1

Compression:

Stored size: 289 Bytes

Contents

# frozen_string_literal: true

module BasicTemperature
  class Temperature
    module Casting
      private

      def cast_degrees(degrees)
        Float(degrees)
      rescue ArgumentError
        nil
      end

      def cast_scale(scale)
        scale.to_s
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
basic_temperature-1.0.0 lib/basic_temperature/temperature/casting.rb