Sha256: b7e4e18efe4fe4b654c6e3145f2f615e461cc3d06586fcde45b43f8ecf85025e

Contents?: true

Size: 413 Bytes

Versions: 29

Compression:

Stored size: 413 Bytes

Contents

module Cucumber
  module Glue
    class WorldFactory
      def initialize(proc)
        @proc = proc || -> { Object.new }
      end

      def create_world
        @proc.call || raise_nil_world
      end

      def raise_nil_world
        raise NilWorld
      rescue NilWorld => e
        e.backtrace.clear
        e.backtrace.push(Glue.backtrace_line(@proc, 'World'))
        raise e
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 3 rubygems

Version Path
cucumber-9.0.1 lib/cucumber/glue/world_factory.rb
cucumber-9.0.0 lib/cucumber/glue/world_factory.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/glue/world_factory.rb
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/glue/world_factory.rb
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/glue/world_factory.rb
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-8.0.0/lib/cucumber/glue/world_factory.rb
cucumber-8.0.0 lib/cucumber/glue/world_factory.rb
cucumber-8.0.0.rc.1 lib/cucumber/glue/world_factory.rb
phillipug-foodie-0.1.0 .vendor/ruby/3.0.0/gems/cucumber-7.1.0/lib/cucumber/glue/world_factory.rb
cucumber-7.1.0 lib/cucumber/glue/world_factory.rb
cucumber-7.0.0 lib/cucumber/glue/world_factory.rb
cucumber-6.1.0 lib/cucumber/glue/world_factory.rb
cucumber-6.0.0 lib/cucumber/glue/world_factory.rb
cucumber-5.3.0 lib/cucumber/glue/world_factory.rb
cucumber-5.2.0 lib/cucumber/glue/world_factory.rb
cucumber-5.1.3 lib/cucumber/glue/world_factory.rb
cucumber-5.1.2 lib/cucumber/glue/world_factory.rb
cucumber-5.1.1 lib/cucumber/glue/world_factory.rb
cucumber-5.1.0 lib/cucumber/glue/world_factory.rb
cucumber-5.0.0 lib/cucumber/glue/world_factory.rb