Class: Cucumber::Messages::Rule
- 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
Returns the value of attribute children.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#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 ‘Rule` keyword.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#tags ⇒ Object
readonly
All the tags placed above the ‘Rule` keyword.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new Rule from the given hash.
Instance Method Summary collapse
-
#initialize(location: Location.new, tags: [], keyword: '', name: '', description: '', children: [], id: '') ⇒ Rule
constructor
A new instance of Rule.
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: '', children: [], id: '') ⇒ Rule
Returns a new instance of Rule.
555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 555 def initialize( location: Location.new, tags: [], keyword: '', name: '', description: '', children: [], id: '' ) @location = location @tags = @keyword = keyword @name = name @description = description @children = children @id = id end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
551 552 553 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 551 def children @children end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
549 550 551 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 549 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
553 554 555 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 553 def id @id end |
#keyword ⇒ Object (readonly)
Returns the value of attribute keyword.
545 546 547 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 545 def keyword @keyword end |
#location ⇒ Object (readonly)
The location of the ‘Rule` keyword
538 539 540 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 538 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
547 548 549 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 547 def name @name end |
#tags ⇒ Object (readonly)
All the tags placed above the ‘Rule` keyword
543 544 545 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 543 def @tags end |
Class Method Details
.from_h(hash) ⇒ Object
280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 280 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], children: hash[:children]&.map { |item| RuleChild.from_h(item) }, id: hash[:id], ) end |