Sha256: 4059f26f781c1790dfc851ee846096fb5b243b442349c6e641eb58413cce6d80

Contents?: true

Size: 289 Bytes

Versions: 9

Compression:

Stored size: 289 Bytes

Contents

module Wasserstand
  class Measurement
    attr_reader :date, :value, :trend

    def initialize(date, value, trend)
      @date, @value, @trend = date, value, trend
    end

    def to_i
      @value
    end

    def to_s
      "#{@date}: #{@value} cm, trend #{@trend}"
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
wasserstand-0.0.9 lib/wasserstand/measurement.rb
wasserstand-0.0.8 lib/wasserstand/measurement.rb
wasserstand-0.0.7 lib/wasserstand/measurement.rb
wasserstand-0.0.6 lib/wasserstand/measurement.rb
wasserstand-0.0.5 lib/wasserstand/measurement.rb
wasserstand-0.0.4 lib/wasserstand/measurement.rb
wasserstand-0.0.3 lib/wasserstand/measurement.rb
wasserstand-0.0.2 lib/wasserstand/measurement.rb
wasserstand-0.0.1 lib/wasserstand/measurement.rb