Packages
Story BDD tool based on cucumber. Parses Gherkin formatted feature files and executes them as tests.
Current section
Files
Jump to
Current section
Files
lib/white_bread/regex_extension.ex
defmodule WhiteBread.RegexExtension do
def atom_keyed_named_captures(regex, string) do
captures = Regex.named_captures(regex, string)
captures
|> Dict.keys
|> Enum.map(fn(key) -> {String.to_atom(key), Dict.get(captures, key)} end)
end
end