lib/vedeu/colours/colour.rb in vedeu-0.8.6 vs lib/vedeu/colours/colour.rb in vedeu-0.8.7
- old
+ new
@@ -91,11 +91,11 @@
# @return [Boolean]
def eql?(other)
self.class == other.class && background == other.background &&
foreground == other.foreground
end
- alias_method :==, :eql?
+ alias == eql?
# @return [Vedeu::Colours::Foreground]
def foreground
Vedeu::Colours::Foreground.coerce(@foreground)
end
@@ -116,22 +116,22 @@
end
# @return [Hash<Symbol => Hash<Symbol => String>>]
def to_h
{
- colour: background.to_h.merge!(foreground.to_h)
+ colour: background.to_h.merge!(foreground.to_h),
}
end
- alias_method :to_hash, :to_h
+ alias to_hash to_h
# Returns both or either of the converted attributes into a
# single escape sequence.
#
# @return [String]
def to_s
"#{foreground}#{background}"
end
- alias_method :to_str, :to_s
+ alias to_str to_s
private
# @return [Hash<Symbol => Vedeu::Colours::Background|
# Vedeu::Colours:Foreground]