module Cucumber

def alias_step_definitions(lang) #:nodoc:

:nodoc:
def alias_step_definitions(lang) #:nodoc:
  keywords = %w{given when then and but}.map{|keyword| keyword_hash(lang)[keyword].split('|')}
  alias_steps(keywords.flatten)
end

def alias_steps(keywords)

and: And|With

languages.yml. For example:
want to create aliases in the parser, you have to do this in
This does *not* affect how feature files are parsed. If you
Sets up additional method aliases for Given, When and Then.
def alias_steps(keywords)
  keywords.each do |adverb|
    StepMother.alias_adverb(adverb)
    World.alias_adverb(adverb)
  end
end

def file_mode(m)

File mode that accounts for Ruby platform and current language
def file_mode(m)
  Cucumber::RUBY_1_9 ? "#{m}:#{keyword_hash['encoding']}" : m
end

def keyword_hash(lang=@lang)

specified.
language, or for a specific language if +lang+ is
Returns a Hash of the currently active
def keyword_hash(lang=@lang)
  LANGUAGES[lang]
end

def language_incomplete?(lang=@lang)

def language_incomplete?(lang=@lang)
  KEYWORD_KEYS.detect{|key| keyword_hash(lang)[key].nil?}
end

def load_language(lang) #:nodoc:

:nodoc:
def load_language(lang) #:nodoc:
  return if @lang
  @lang = lang
  alias_step_definitions(lang)
  Parser.load_parser(keyword_hash)
end

def scenario_keyword

def scenario_keyword
  keyword_hash['scenario'].split('|')[0] + ':'
end