Sha256: b711ff06da9f479d1f5dcf1e1ba8aa6b73a02c2c1b737517e6437dc54b654e7d

Contents?: true

Size: 312 Bytes

Versions: 11

Compression:

Stored size: 312 Bytes

Contents

module Squid
  class Gridline
    def self.for(count:, skip_baseline:, height:)
      return [] if count.zero?
      height.step(0, -height/count.to_f).map do |y|
        new y: y unless skip_baseline && y.zero?
      end.compact
    end

    attr_reader :y

    def initialize(y:)
      @y = y
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
squid-1.4.1 lib/squid/gridline.rb
squid-1.4.0 lib/squid/gridline.rb
squid-1.3.0 lib/squid/gridline.rb
squid-1.2.0 lib/squid/gridline.rb
squid-1.1.0 lib/squid/gridline.rb
squid-1.0.1 lib/squid/gridline.rb
squid-1.0.0 lib/squid/gridline.rb
squid-1.0.0.beta4 lib/squid/gridline.rb
squid-1.0.0.beta3 lib/squid/gridline.rb
squid-1.0.0.beta2 lib/squid/gridline.rb
squid-1.0.0.beta1 lib/squid/gridline.rb