Sha256: 95f30a76a2b69115e0fdaa67e217ca559645009a8a38cf6ef4b8f1a51fed7727

Contents?: true

Size: 374 Bytes

Versions: 2

Compression:

Stored size: 374 Bytes

Contents

module Straightedge
  module Surface
    attr_accessor :adapter
    attr_reader :width, :height

    def display
      warn 'implement in subclass'
    end
  end

  class AbstractSurface
    include Surface

    def initialize(geometry, adapter: adapter)
      @width, @height = *geometry
      @adapter = adapter
    end
  end

  config.surface_class = AbstractSurface
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
straightedge-0.1.2 lib/straightedge/surface.rb
straightedge-0.1.1 lib/straightedge/surface.rb