Class: Cucumber::Messages::Feature
- 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
-
#children ⇒ Object
readonly
Zero or more children.
-
#description ⇒ Object
readonly
The line(s) underneath the line with the ‘keyword` that are used as description.
-
#keyword ⇒ Object
readonly
The text of the ‘Feature` keyword (in the language specified by `language`).
-
#language ⇒ Object
readonly
The [ISO 639-1](en.wikipedia.org/wiki/ISO_639-1) language code of the Gherkin document.
-
#location ⇒ Object
readonly
The location of the ‘Feature` keyword.
-
#name ⇒ Object
readonly
The name of the feature (the text following the ‘keyword`).
-
#tags ⇒ Object
readonly
All the tags placed above the ‘Feature` keyword.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new Feature from the given hash.
Instance Method Summary collapse
-
#initialize(location: Location.new, tags: [], language: '', keyword: '', name: '', description: '', children: []) ⇒ Feature
constructor
A new instance of Feature.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(location: Location.new, tags: [], language: '', keyword: '', name: '', description: '', children: []) ⇒ Feature
Returns a new instance of Feature.
480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 480 def initialize( location: Location.new, tags: [], language: '', keyword: '', name: '', description: '', children: [] ) @location = location @tags = @language = language @keyword = keyword @name = name @description = description @children = children end |
Instance Attribute Details
#children ⇒ Object (readonly)
Zero or more children
478 479 480 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 478 def children @children end |
#description ⇒ Object (readonly)
The line(s) underneath the line with the ‘keyword` that are used as description
473 474 475 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 473 def description @description end |
#keyword ⇒ Object (readonly)
The text of the ‘Feature` keyword (in the language specified by `language`)
463 464 465 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 463 def keyword @keyword end |
#language ⇒ Object (readonly)
The [ISO 639-1](en.wikipedia.org/wiki/ISO_639-1) language code of the Gherkin document
458 459 460 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 458 def language @language end |
#location ⇒ Object (readonly)
The location of the ‘Feature` keyword
448 449 450 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 448 def location @location end |
#name ⇒ Object (readonly)
The name of the feature (the text following the ‘keyword`)
468 469 470 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 468 def name @name end |
#tags ⇒ Object (readonly)
All the tags placed above the ‘Feature` keyword
453 454 455 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 453 def @tags end |
Class Method Details
.from_h(hash) ⇒ Object
234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 234 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) }, language: hash[:language], keyword: hash[:keyword], name: hash[:name], description: hash[:description], children: hash[:children]&.map { |item| FeatureChild.from_h(item) }, ) end |