Class: Cucumber::Messages::Scenario
- 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
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#examples ⇒ Object
readonly
Returns the value of attribute examples.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#keyword ⇒ Object
readonly
Returns the value of attribute keyword.
-
#location ⇒ Object
readonly
The location of the ‘Scenario` keyword.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#steps ⇒ Object
readonly
Returns the value of attribute steps.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new Scenario from the given hash.
Instance Method Summary collapse
-
#initialize(location: Location.new, tags: [], keyword: '', name: '', description: '', steps: [], examples: [], id: '') ⇒ Scenario
constructor
A new instance of Scenario.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(location: Location.new, tags: [], keyword: '', name: '', description: '', steps: [], examples: [], id: '') ⇒ Scenario
Returns a new instance of Scenario.
625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 625 def initialize( location: Location.new, tags: [], keyword: '', name: '', description: '', steps: [], examples: [], id: '' ) @location = location @tags = @keyword = keyword @name = name @description = description @steps = steps @examples = examples @id = id end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
617 618 619 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 617 def description @description end |
#examples ⇒ Object (readonly)
Returns the value of attribute examples.
621 622 623 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 621 def examples @examples end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
623 624 625 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 623 def id @id end |
#keyword ⇒ Object (readonly)
Returns the value of attribute keyword.
613 614 615 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 613 def keyword @keyword end |
#location ⇒ Object (readonly)
The location of the ‘Scenario` keyword
609 610 611 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 609 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
615 616 617 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 615 def name @name end |
#steps ⇒ Object (readonly)
Returns the value of attribute steps.
619 620 621 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 619 def steps @steps end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
611 612 613 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 611 def @tags end |
Class Method Details
.from_h(hash) ⇒ Object
325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 325 def self.from_h(hash) return nil if hash.nil? self.new( location: Location.from_h(hash[:location]), tags: hash[:tags]&.map { |item| Tag.from_h(item) }, keyword: hash[:keyword], name: hash[:name], description: hash[:description], steps: hash[:steps]&.map { |item| Step.from_h(item) }, examples: hash[:examples]&.map { |item| Examples.from_h(item) }, id: hash[:id], ) end |