class Squid::Gridline

Attributes

y[R]

Public Class Methods

for(count:, skip_baseline:, height:) click to toggle source
# File lib/squid/gridline.rb, line 3
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
new(y:) click to toggle source
# File lib/squid/gridline.rb, line 12
def initialize(y:)
  @y = y
end