Sha256: f1fc277aa38501030f8b218736d0cfa5f8c3224e497251f1b4573450b215b745

Contents?: true

Size: 1.44 KB

Versions: 5

Compression:

Stored size: 1.44 KB

Contents

# frozen_string_literal: true
require 'receptacle'
module Speed
  include Receptacle::Repo
  mediate :a
  mediate :b
  mediate :c
  mediate :d
  mediate :e
  mediate :f
  mediate :g
  module Strategy
    class One
      def a(arg)
        arg
      end
      alias b a
      alias c a
      alias d a
      alias e a
      alias f a
      alias g a
    end
  end

  module Wrappers
    class W1
      def before_a(args)
        args
      end

      def after_a(return_values, _)
        return_values
      end

      def before_f(args)
        args
      end

      def after_f(return_values, _)
        return_values
      end
    end

    class W2
      # :a
      def before_a(args)
        args
      end

      def after_a(return_values, _)
        return_values
      end

      # :b
      def before_b(args)
        args
      end

      def after_b(return_values, _)
        return_values
      end
    end
    class W3
      def before_a(args)
        args
      end

      def before_c(args)
        args
      end
    end

    class W4
      def after_a(return_values, _)
        return_values
      end

      def after_d(return_value, _)
        return_value
      end
    end

    class W5
      def before_b(args)
        args
      end

      def after_c(return_value, _)
        return_value
      end
    end

    class W6
      def after_b(return_value, _)
        return_value
      end

      def before_e(args)
        args
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
receptacle-0.3.1 performance/speed_receptacle.rb
receptacle-0.3.0 performance/speed_receptacle.rb
receptacle-0.2.0 performance/speed_receptacle.rb
receptacle-0.1.1 performance/speed_receptacle.rb
receptacle-0.1.0 performance/speed_receptacle.rb