lib/vedeu/dsl/shared/colour.rb in vedeu-0.4.15 vs lib/vedeu/dsl/shared/colour.rb in vedeu-0.4.16

- old
+ new

@@ -68,16 +68,15 @@ # # stream do # colour background: '#000000', foreground: '#ffffff' # # ... # - # @return [Hash] + # @return [Vedeu::Colour] def colour(attributes = {}) attributes.delete_if do |k, v| [:background, :foreground].include?(k) == false || v.nil? || v.empty? end - - model.colour = Vedeu::Colour.new(attributes) + model.colour = Vedeu::Colour.coerce(attributes) end end # Colour end # DSL