lib/yard/i18n/message.rb in yard-0.9.5 vs lib/yard/i18n/message.rb in yard-0.9.6
- old
+ new
@@ -1,5 +1,6 @@
+# frozen_string_literal: true
require "set"
module YARD
module I18n
# +Message+ is a translation target message. It has message ID as
@@ -8,11 +9,11 @@
# @since 0.8.1
class Message
# @return [String] the message ID of the trnslation target message.
attr_reader :id
- # @return [Set] the set of locations. Location is an array of
+ # @return [Set] the set of locations. Location is an array of
# path and line number where the message is appeared.
attr_reader :locations
# @return [Set] the set of comments for the messages.
attr_reader :comments
@@ -44,12 +45,12 @@
end
# @param [Message] other the +Message+ to be compared.
# @return [Boolean] checks whether this message is equal to another.
def ==(other)
- other.is_a?(self.class) and
- @id == other.id and
- @locations == other.locations and
+ other.is_a?(self.class) &&
+ @id == other.id &&
+ @locations == other.locations &&
@comments == other.comments
end
end
end
end