Class: SQLite3::TestCollation::Comparator

Inherits:
Object
  • Object
show all
Defined in:
lib/sqlite3-1.5.3-arm64-darwin/test/test_collation.rb,
lib/sqlite3-1.5.3-x86_64-darwin/test/test_collation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeComparator

Returns a new instance of Comparator.



9
10
11
# File 'lib/sqlite3-1.5.3-arm64-darwin/test/test_collation.rb', line 9

def initialize
  @calls = []
end

Instance Attribute Details

#callsObject (readonly)

Returns the value of attribute calls.



8
9
10
# File 'lib/sqlite3-1.5.3-arm64-darwin/test/test_collation.rb', line 8

def calls
  @calls
end

Instance Method Details

#compare(left, right) ⇒ Object



13
14
15
16
# File 'lib/sqlite3-1.5.3-arm64-darwin/test/test_collation.rb', line 13

def compare left, right
  @calls << [left, right]
  left <=> right
end