Class: Cucumber::Tcl::DataTable

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/tcl/data_table.rb

Overview

Wraps the Cucumber DataTable so that when passed through to tcl, its string representation is easy to parse into a tcl list.

Instance Method Summary collapse

Constructor Details

#initialize(original) ⇒ DataTable

Returns a new instance of DataTable.



7
8
9
# File 'lib/cucumber/tcl/data_table.rb', line 7

def initialize(original)
  @raw = original.raw
end

Instance Method Details

#to_sObject



11
12
13
# File 'lib/cucumber/tcl/data_table.rb', line 11

def to_s
  to_tcl_list(@raw.map { |row| to_tcl_list(row) })
end