Sha256: 85dbdc68b86bdc72e12cb01790b6311932a194384eb3f2ed200510efca2fdd1c

Contents?: true

Size: 327 Bytes

Versions: 1

Compression:

Stored size: 327 Bytes

Contents

module Falling
  class Area
    attr_reader :width,
                :height

    def initialize(width:,
                   height:)
      @width = width
      @height = height
    end

    def to_a
      @garbage ||=
        (1..height).map do
          (1..width).map { %w(# . . .).sample }.join
        end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
falling-0.0.1 lib/falling/area.rb