Parent

Files

Class/Module Index [+]

Quicksearch

Cucumber::Runtime::ForProgrammingLanguages

This is what a programming language will consider to be a runtime.

It's a thin class that directs the handul of methods needed by the programming languages to the right place.

Public Class Methods

new(support_code, user_interface) click to toggle source
# File lib/cucumber/runtime/for_programming_languages.rb, line 12
def initialize(support_code, user_interface)
  @support_code, @user_interface = support_code, user_interface
end

Public Instance Methods

doc_string(string_with_triple_quotes, file=nil, line_offset=0) click to toggle source

Returns a regular String for string_with_triple_quotes. Example:

"""
 hello
world
"""

Is retured as: " hellonworld"

# File lib/cucumber/runtime/for_programming_languages.rb, line 62
def doc_string(string_with_triple_quotes, file=nil, line_offset=0)
  Ast::DocString.parse(string_with_triple_quotes)
end
table(text_or_table, file=nil, line_offset=0) click to toggle source

Returns a Cucumber::Ast::Table for text_or_table, which can either be a String:

table(%{
  | account | description | amount |
  | INT-100 | Taxi        | 114    |
  | CUC-101 | Peeler      | 22     |
})

or a 2D Array:

table([
  %w{ account description amount },
  %w{ INT-100 Taxi        114    },
  %w{ CUC-101 Peeler      22     }
])
# File lib/cucumber/runtime/for_programming_languages.rb, line 45
def table(text_or_table, file=nil, line_offset=0)
  if Array === text_or_table
    Ast::Table.new(text_or_table)
  else
    Ast::Table.parse(text_or_table, file, line_offset)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.