Method: Xliff::File#entry_with_id

Defined in:
lib/xliff/file.rb

#entry_with_id(id) ⇒ Xliff::Entry?

Find the first entry with a given ‘id`, if present

Parameters:

  • entry (String)

    The ‘id` to search for.

Returns:



79
80
81
82
83
# File 'lib/xliff/file.rb', line 79

def entry_with_id(id)
  @entries.find do |entry|
    entry.id == id
  end
end