Sha256: 5cdfb476adea4647cf0a051202c9ab7383fa877766c9957c83c7aa6f2d0f4c59

Contents?: true

Size: 272 Bytes

Versions: 1

Compression:

Stored size: 272 Bytes

Contents

module MovingAvg
  class Calculator
    attr_reader :strategy, :options

    def initialize(strategy:, options: {})
      @strategy = strategy
      @options = options
    end

    def moving_avg(items)
      MovingAvg::Base.public_send(strategy, items)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
moving_avg-0.2.2 lib/moving_avg/calculator.rb