class YARD::I18n::Messages
@since 0.8.1
Acts as a container for {Message} objects.
def ==(other)
-
(Boolean)
- whether +self+ and +other+ is equivalence or not.
Parameters:
-
other
(Messages
) -- the container to compare.
def ==(other) other.is_a?(self.class) && @messages == other.messages end
def [](id)
-
(Message, nil)
- a registered message for the given +id+,
Parameters:
-
id
(String
) -- the message ID to perform a lookup on.
def [](id) @messages[id] end
def each(&block)
-
(void)
-
Other tags:
- Yieldparam: message - the next message object in
def each(&block) @messages.each_value(&block) end
def initialize
def initialize @messages = {} end
def register(id)
-
(Message)
- the registered +Message+.
Parameters:
-
id
(String
) -- the ID of the message to be registered.
def register(id) @messages[id] ||= Message.new(id) end