lib/vedeu/models/line.rb in vedeu-0.0.32 vs lib/vedeu/models/line.rb in vedeu-0.0.33
- old
+ new
@@ -1,21 +1,23 @@
-require 'oj'
+require 'json'
require 'virtus'
require_relative 'presentation'
require_relative '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
- Oj.dump(json_attributes, mode: :compat)
+ json_attributes.to_json
end
def to_s
[colour, style, streams].join
end
@@ -23,10 +25,10 @@
private
def json_attributes
{
colour: colour,
- style: style,
+ style: style_original,
streams: streams
}
end
end
end