Class: RSpec::Core::Ordering::Custom

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/core/ordering.rb

Overview

Orders items based on a custom block.

Instance Method Summary collapse

Constructor Details

#initialize(callable) ⇒ Custom

Returns a new instance of Custom



64
65
66
# File 'lib/rspec/core/ordering.rb', line 64

def initialize(callable)
  @callable = callable
end

Instance Method Details

#order(list) ⇒ Object



68
69
70
# File 'lib/rspec/core/ordering.rb', line 68

def order(list)
  @callable.call(list)
end