Module: Ruborithms::Algorithms::BinarySearch

Defined in:
lib/ruborithms/algorithms/binary_search.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(mod) ⇒ Object



5
6
7
# File 'lib/ruborithms/algorithms/binary_search.rb', line 5

def included(mod)
  mod.extend(ClassMethods)
end

Instance Method Details

#binary_search(value) ⇒ Object



26
27
28
# File 'lib/ruborithms/algorithms/binary_search.rb', line 26

def binary_search(value)
  self.class.binary_search(self, value)
end