lib/vedeu/colours/colour.rb in vedeu-0.6.53 vs lib/vedeu/colours/colour.rb in vedeu-0.6.54
- old
+ new
@@ -63,11 +63,12 @@
new(background: :default, foreground: :default)
end
# Returns a new instance of Vedeu::Colours::Colour.
#
- # @param attributes [Hash]
+ # @param attributes [Hash<Symbol => String|
+ # Vedeu::Colours::Background|Vedeu::Colours:Foreground>]
# @option attributes background [String]
# @option attributes foreground [String]
# @return [Vedeu::Colours::Colour]
def initialize(attributes = {})
defaults.merge!(attributes).each do |key, value|
@@ -129,13 +130,15 @@
end
alias_method :to_str, :to_s
private
+ # @return [Hash<Symbol => Vedeu::Colours::Background|
+ # Vedeu::Colours:Foreground]
def defaults
{
background: Vedeu::Colours::Background.new,
- foreground: Vedeu::Colours::Foreground.new
+ foreground: Vedeu::Colours::Foreground.new,
}
end
end # Colour