Sha256: 2ab0724fb48f6089a4f483d2bc96d89736b58fc16997f2d0860cf8361a32479d

Contents?: true

Size: 512 Bytes

Versions: 10

Compression:

Stored size: 512 Bytes

Contents

# typed: ignore

# Copyright (c) 2015 Sqreen. All Rights Reserved.
# Please refer to our terms for more information: https://www.sqreen.com/terms.html

require 'sqreen/cb'

module Sqreen
  class RunWhenCalledCB < CB
    def initialize(klass, method, &block)
      super(klass, method)

      raise 'missing block' unless block_given?
      @block = block
    end

    def pre(_inst, _args, _budget = nil, &_block)
      # FIXME: implement this removal
      @remove_me = true
      @block.call
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
sqreen-1.25.1 lib/sqreen/run_when_called_cb.rb
sqreen-1.25.0 lib/sqreen/run_when_called_cb.rb
sqreen-1.24.3 lib/sqreen/run_when_called_cb.rb
sqreen-1.24.2 lib/sqreen/run_when_called_cb.rb
sqreen-1.24.1 lib/sqreen/run_when_called_cb.rb
sqreen-1.24.0 lib/sqreen/run_when_called_cb.rb
sqreen-1.23.2 lib/sqreen/run_when_called_cb.rb
sqreen-1.23.1 lib/sqreen/run_when_called_cb.rb
sqreen-1.23.0 lib/sqreen/run_when_called_cb.rb
sqreen-1.22.1 lib/sqreen/run_when_called_cb.rb