Sha256: 6239ca235e3ec7de6313eb2876a8c7681b6699af1eed1386ff2af340c4cbd0d5

Contents?: true

Size: 504 Bytes

Versions: 1

Compression:

Stored size: 504 Bytes

Contents

require 'json'
require 'virtus'

require_relative 'presentation'
require_relative 'attributes/stream_collection'
require_relative 'style'

module Vedeu
  class Line
    include Virtus.model
    include Presentation
    include Style

    attribute :model,   Hash
    attribute :streams, StreamCollection

    def to_json
      {
        colour:  colour,
        style:   style_original,
        streams: streams
      }.to_json
    end

    def to_s
      [colour, style, streams].join
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vedeu-0.0.34 lib/vedeu/models/line.rb