class YARD::I18n::Messages

@since 0.8.1
Acts as a container for {Message} objects.

def ==(other)

Returns:
  • (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)

Returns:
  • (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)

Returns:
  • (void) -

Other tags:
    Yieldparam: message - the next message object in
def each(&block)
  @messages.each_value(&block)
end

def initialize

Creates a new container.
def initialize
  @messages = {}
end

def register(id)

Returns:
  • (Message) - the registered +Message+.

Parameters:
  • id (String) -- the ID of the message to be registered.
def register(id)
  @messages[id] ||= Message.new(id)
end