class Cucumber::Glue::RegistryWrapper

This class wraps some internals methods to expose them to external plugins.

Public Class Methods

new(registry) click to toggle source
# File lib/cucumber/glue/registry_wrapper.rb, line 8
def initialize(registry)
  @registry = registry
end

Public Instance Methods

create_expression(string_or_regexp) click to toggle source

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

# File lib/cucumber/glue/registry_wrapper.rb, line 20
def create_expression(string_or_regexp)
  @registry.create_expression(string_or_regexp)
end
current_world() click to toggle source

Return the current execution environment - AKA an isntance of World

# File lib/cucumber/glue/registry_wrapper.rb, line 26
def current_world
  @registry.current_world
end