Class: Cucumber::Messages::TableRow
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb,
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb
Overview
Represents the TableRow message in Cucumber’s message protocol.
A row in a table
Instance Attribute Summary collapse
-
#cells ⇒ Object
readonly
Cells in the row.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#location ⇒ Object
readonly
The location of the first cell in the row.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new TableRow from the given hash.
Instance Method Summary collapse
-
#initialize(location: Location.new, cells: [], id: '') ⇒ TableRow
constructor
A new instance of TableRow.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(location: Location.new, cells: [], id: '') ⇒ TableRow
Returns a new instance of TableRow.
739 740 741 742 743 744 745 746 747 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 739 def initialize( location: Location.new, cells: [], id: '' ) @location = location @cells = cells @id = id end |
Instance Attribute Details
#cells ⇒ Object (readonly)
Cells in the row
735 736 737 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 735 def cells @cells end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
737 738 739 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 737 def id @id end |
#location ⇒ Object (readonly)
The location of the first cell in the row
730 731 732 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 730 def location @location end |
Class Method Details
.from_h(hash) ⇒ Object
395 396 397 398 399 400 401 402 403 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 395 def self.from_h(hash) return nil if hash.nil? self.new( location: Location.from_h(hash[:location]), cells: hash[:cells]&.map { |item| TableCell.from_h(item) }, id: hash[:id], ) end |