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

Inherits:
Object
  • Object
show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/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.



72
73
74
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/ordering.rb', line 72

def initialize(callable)
  @callable = callable
end

Instance Method Details

#order(list) ⇒ Object



76
77
78
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/ordering.rb', line 76

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