Class: Cucumber::Messages::PickleTable
- 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
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new PickleTable from the given hash.
Instance Method Summary collapse
-
#initialize(rows: []) ⇒ PickleTable
constructor
A new instance of PickleTable.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(rows: []) ⇒ PickleTable
Returns a new instance of PickleTable.
1226 1227 1228 1229 1230 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1226 def initialize( rows: [] ) @rows = rows end |
Instance Attribute Details
#rows ⇒ Object (readonly)
Returns the value of attribute rows.
1224 1225 1226 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1224 def rows @rows end |
Class Method Details
.from_h(hash) ⇒ Object
Returns a new PickleTable from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::PickleTable.from_h(some_hash) # => #<Cucumber::Messages::PickleTable:0x... ...>
697 698 699 700 701 702 703 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 697 def self.from_h(hash) return nil if hash.nil? self.new( rows: hash[:rows]&.map { |item| PickleTableRow.from_h(item) }, ) end |