Sha256: ed51998a9251b12701e6732d637fcb10de058ccc66dd2c07568163445c3504ca

Contents?: true

Size: 442 Bytes

Versions: 6

Compression:

Stored size: 442 Bytes

Contents

require 'json'
require 'virtus'

require 'vedeu/models/presentation'
require 'vedeu/models/style'

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

    attribute :text, String, default: ''

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

    def to_s(options = {})
      [colour, style, text].join
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vedeu-0.1.2 lib/vedeu/models/stream.rb
vedeu-0.1.1 lib/vedeu/models/stream.rb
vedeu-0.1.0 lib/vedeu/models/stream.rb
vedeu-0.0.42 lib/vedeu/models/stream.rb
vedeu-0.0.41 lib/vedeu/models/stream.rb
vedeu-0.0.40 lib/vedeu/models/stream.rb