Sha256: 0cefcd5769c64bb38ff75b840041f333aa62a6988c140f8df3214b8bc5c4dad6

Contents?: true

Size: 673 Bytes

Versions: 1

Compression:

Stored size: 673 Bytes

Contents

module Vedeu
  class Interface
    extend Forwardable
    include Virtus.model

    attribute :name,     String
    attribute :group,    String
    attribute :lines,    LineCollection
    attribute :colour,   Colour,   default: Colour.new
    attribute :style,    Style,    default: ''
    attribute :geometry, Geometry, default: Geometry.new
    attribute :cursor,   Boolean,  default: true
    attribute :delay,    Float,    default: 0

    def_delegators :@geometry, :north, :east, :south, :west,
                               :top, :right, :bottom, :left,
                               :width, :height, :origin

    def to_s
      Render.call(self)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vedeu-0.1.10 lib/vedeu/models/interface.rb