class YARD::CodeObjects::Lucid::ScenarioOutline::Examples
Attributes
comments[RW]
keyword[RW]
line[RW]
name[RW]
rows[RW]
Public Class Methods
new(parameters = {})
click to toggle source
# File lib/yard/code_objects/lucid/scenario_outline.rb, line 61 def initialize(parameters = {}) parameters.each { |key,value| send("#{key.to_sym}=",value) if respond_to? "#{key.to_sym}=" } end
Public Instance Methods
data()
click to toggle source
The data of the table starts at the second row. When there is no data then return a empty string.
# File lib/yard/code_objects/lucid/scenario_outline.rb, line 37 def data rows ? rows[1..-1] : "" end
headers()
click to toggle source
The first row of the rows contains the headers for the table
# File lib/yard/code_objects/lucid/scenario_outline.rb, line 31 def headers rows.first end
to_hash()
click to toggle source
# File lib/yard/code_objects/lucid/scenario_outline.rb, line 51 def to_hash hash = {} rows.each_with_index do |header,index| hash[header] = rows.collect { |row| row[index] } end hash end
values_for_row(row)
click to toggle source
# File lib/yard/code_objects/lucid/scenario_outline.rb, line 41 def values_for_row(row) hash = {} headers.each_with_index do |header,index| hash[header] = data[row][index] end hash end