Sha256: 9fc733ac88f20f5691c20c923bcab4dbf3303e2d452d1e9c856eda4439c82701

Contents?: true

Size: 473 Bytes

Versions: 1

Compression:

Stored size: 473 Bytes

Contents

require 'json'
require 'virtus'

require_relative 'presentation'
require_relative '../support/terminal'
require_relative '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

1 entries across 1 versions & 1 rubygems

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