class FactoryBot::Callback

def ==(other)

def ==(other)
  name == other.name &&
    block == other.block
end

def initialize(name, block)

def initialize(name, block)
  @name = name.to_sym
  @block = block
end

def run(instance, evaluator)

def run(instance, evaluator)
  case block.arity
  when 1, -1, -2 then syntax_runner.instance_exec(instance, &block)
  when 2 then syntax_runner.instance_exec(instance, evaluator, &block)
  else syntax_runner.instance_exec(&block)
  end
end

def syntax_runner

def syntax_runner
  @syntax_runner ||= SyntaxRunner.new
end