lib/vedeu/output/presentation/colour.rb in vedeu-0.6.43 vs lib/vedeu/output/presentation/colour.rb in vedeu-0.6.44
- old
+ new
@@ -51,11 +51,11 @@
# Allows the setting of the model's colour by coercing the given
# value into a Vedeu::Colours::Colour.
#
# @return [Vedeu::Colours::Colour]
def colour=(value)
- @colour = Vedeu::Colours::Colour.coerce(value)
+ @colour = attributes[:colour] = Vedeu::Colours::Colour.coerce(value)
end
# When the foreground colour for the model exists, return it,
# otherwise returns the parent foreground colour, or an empty
# Vedeu::Colours::Foreground.
@@ -77,10 +77,10 @@
# Allows the setting of the foreground colour by coercing the
# given value into a Vedeu::Colours::Foreground colour.
#
# @return [Vedeu::Colours::Foreground]
def foreground=(value)
- @colour = Vedeu::Colours::Colour.coerce(
+ @colour = attributes[:colour] = Vedeu::Colours::Colour.coerce(
background: colour.background,
foreground: Vedeu::Colours::Foreground.coerce(value))
end
end # Colour