Class: Cucumber::Salad::Widgets::AutoTable::Row

Inherits:
Widget
  • Object
show all
Defined in:
lib/cucumber/salad/widgets/auto_table.rb

Instance Attribute Summary

Attributes inherited from Widget

#root

Instance Method Summary collapse

Methods inherited from Widget

find_in, #has_action?, #inspect, present_in?, #reload, root, selector, #to_s

Methods included from Cucumber::Salad::WidgetMacros

#action, #widget, #widget_delegator

Methods included from Cucumber::Salad::WidgetContainer

#has_widget?, #widget

Constructor Details

#initialize(settings) ⇒ Row

Returns a new instance of Row.



54
55
56
57
58
59
60
# File 'lib/cucumber/salad/widgets/auto_table.rb', line 54

def initialize(settings)
  s = settings.dup

  self.cell_selector = s.delete(:cell_selector)

  super s
end

Instance Method Details

#valuesObject



62
63
64
# File 'lib/cucumber/salad/widgets/auto_table.rb', line 62

def values
  root.all(cell_selector).map { |n| node_text(n) }
end