You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

registry_wrapper.rb 927 B

2 years ago
12345678910111213141516171819202122232425262728293031
  1. # frozen_string_literal: true
  2. module Cucumber
  3. module Glue
  4. ##
  5. # This class wraps some internals methods to expose them to external plugins.
  6. class RegistryWrapper
  7. def initialize(registry)
  8. @registry = registry
  9. end
  10. ##
  11. # Creates a new CucumberExpression from the given +string_or_regexp+.
  12. #
  13. # If +string_or_regexp+ is a string, it will return a new CucumberExpression::CucumberExpression
  14. #
  15. # If +string_or_regexp+ is a regexp, it will return a new CucumberExpressions::RegularExpression
  16. #
  17. # An ArgumentError is raised if +string_or_regexp+ is not a string or a regexp
  18. def create_expression(string_or_regexp)
  19. @registry.create_expression(string_or_regexp)
  20. end
  21. ##
  22. # Return the current execution environment - AKA an isntance of World
  23. def current_world
  24. @registry.current_world
  25. end
  26. end
  27. end
  28. end

No Description

Contributors (1)