Class: Mizuho::IdMap::Entry

Inherits:
Struct
  • Object
show all
Defined in:
lib/mizuho/id_map.rb

Overview

fuzzy

Whether #associate has fuzzily associated a title with this entry.

associated

Whether #associate has associated a title with this entry.
Immediately after loading a map file, all entries are marked
as 'not associated'.

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ Object



212
213
214
215
216
217
218
219
220
221
222
# File 'lib/mizuho/id_map.rb', line 212

def <=>(other)
	if (a = Utils.extract_chapter(title)) &&
	   (b = Utils.extract_chapter(other.title))
		# Sort by chapter whenever possible.
		a[0] = Utils.chapter_to_int_array(a[0])
		b[0] = Utils.chapter_to_int_array(b[0])
		return a <=> b
	else
		return title <=> other.title
	end
end