Sha256: 7080fd270d37a85eb8c8d93dddea2fe09098c27735e38d809a9b98e3c09d128c
Contents?: true
Size: 927 Bytes
Versions: 18
Compression:
Stored size: 927 Bytes
Contents
# frozen_string_literal: true module Cucumber module Glue ## # This class wraps some internals methods to expose them to external plugins. class RegistryWrapper def initialize(registry) @registry = registry end ## # Creates a new CucumberExpression from the given +string_or_regexp+. # # If +string_or_regexp+ is a string, it will return a new CucumberExpression::CucumberExpression # # If +string_or_regexp+ is a regexp, it will return a new CucumberExpressions::RegularExpression # # An ArgumentError is raised if +string_or_regexp+ is not a string or a regexp def create_expression(string_or_regexp) @registry.create_expression(string_or_regexp) end ## # Return the current execution environment - AKA an isntance of World def current_world @registry.current_world end end end end
Version data entries
18 entries across 18 versions & 4 rubygems