lib/vedeu/models/stream.rb in vedeu-0.1.2 vs lib/vedeu/models/stream.rb in vedeu-0.1.3

- old
+ new

@@ -1,25 +1,16 @@ -require 'json' require 'virtus' -require 'vedeu/models/presentation' +require 'vedeu/models/colour' 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 + attribute :colour, Colour, default: Colour.new + attribute :style, Style, default: '' + attribute :text, String, default: '' def to_s(options = {}) [colour, style, text].join end end