Class: Cucumber::Messages::Step
- 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 Step message in Cucumber’s message protocol.
A step
Instance Attribute Summary collapse
-
#data_table ⇒ Object
readonly
Returns the value of attribute data_table.
-
#doc_string ⇒ Object
readonly
Returns the value of attribute doc_string.
-
#id ⇒ Object
readonly
Unique ID to be able to reference the Step from PickleStep.
-
#keyword ⇒ Object
readonly
Returns the value of attribute keyword.
-
#location ⇒ Object
readonly
The location of the steps’ ‘keyword`.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new Step from the given hash.
Instance Method Summary collapse
-
#initialize(location: Location.new, keyword: '', text: '', doc_string: nil, data_table: nil, id: '') ⇒ Step
constructor
A new instance of Step.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(location: Location.new, keyword: '', text: '', doc_string: nil, data_table: nil, id: '') ⇒ Step
Returns a new instance of Step.
673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 673 def initialize( location: Location.new, keyword: '', text: '', doc_string: nil, data_table: nil, id: '' ) @location = location @keyword = keyword @text = text @doc_string = doc_string @data_table = data_table @id = id end |
Instance Attribute Details
#data_table ⇒ Object (readonly)
Returns the value of attribute data_table.
666 667 668 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 666 def data_table @data_table end |
#doc_string ⇒ Object (readonly)
Returns the value of attribute doc_string.
664 665 666 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 664 def doc_string @doc_string end |
#id ⇒ Object (readonly)
Unique ID to be able to reference the Step from PickleStep
671 672 673 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 671 def id @id end |
#keyword ⇒ Object (readonly)
Returns the value of attribute keyword.
660 661 662 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 660 def keyword @keyword end |
#location ⇒ Object (readonly)
The location of the steps’ ‘keyword`
658 659 660 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 658 def location @location end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
662 663 664 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 662 def text @text end |
Class Method Details
.from_h(hash) ⇒ Object
351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 351 def self.from_h(hash) return nil if hash.nil? self.new( location: Location.from_h(hash[:location]), keyword: hash[:keyword], text: hash[:text], doc_string: DocString.from_h(hash[:docString]), data_table: DataTable.from_h(hash[:dataTable]), id: hash[:id], ) end |