Class: Cucumber::Messages::DataTable
- 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
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new DataTable from the given hash.
Instance Method Summary collapse
-
#initialize(location: Location.new, rows: []) ⇒ DataTable
constructor
A new instance of DataTable.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(location: Location.new, rows: []) ⇒ DataTable
Returns a new instance of DataTable.
348 349 350 351 352 353 354 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 348 def initialize( location: Location.new, rows: [] ) @location = location @rows = rows end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
344 345 346 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 344 def location @location end |
#rows ⇒ Object (readonly)
Returns the value of attribute rows.
346 347 348 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 346 def rows @rows end |
Class Method Details
.from_h(hash) ⇒ Object
166 167 168 169 170 171 172 173 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 166 def self.from_h(hash) return nil if hash.nil? self.new( location: Location.from_h(hash[:location]), rows: hash[:rows]&.map { |item| TableRow.from_h(item) }, ) end |