Class: Cucumber::Messages::FeatureChild
- 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 FeatureChild message in Cucumber’s message protocol.
*
A child node of a `Feature` node
Instance Attribute Summary collapse
-
#background ⇒ Object
readonly
Returns the value of attribute background.
-
#rule ⇒ Object
readonly
Returns the value of attribute rule.
-
#scenario ⇒ Object
readonly
Returns the value of attribute scenario.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new FeatureChild from the given hash.
Instance Method Summary collapse
-
#initialize(rule: nil, background: nil, scenario: nil) ⇒ FeatureChild
constructor
A new instance of FeatureChild.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(rule: nil, background: nil, scenario: nil) ⇒ FeatureChild
Returns a new instance of FeatureChild.
515 516 517 518 519 520 521 522 523 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 515 def initialize( rule: nil, background: nil, scenario: nil ) @rule = rule @background = background @scenario = scenario end |
Instance Attribute Details
#background ⇒ Object (readonly)
Returns the value of attribute background.
511 512 513 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 511 def background @background end |
#rule ⇒ Object (readonly)
Returns the value of attribute rule.
509 510 511 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 509 def rule @rule end |
#scenario ⇒ Object (readonly)
Returns the value of attribute scenario.
513 514 515 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 513 def scenario @scenario end |
Class Method Details
.from_h(hash) ⇒ Object
Returns a new FeatureChild from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::FeatureChild.from_h(some_hash) # => #<Cucumber::Messages::FeatureChild:0x... ...>
259 260 261 262 263 264 265 266 267 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 259 def self.from_h(hash) return nil if hash.nil? self.new( rule: Rule.from_h(hash[:rule]), background: Background.from_h(hash[:background]), scenario: Scenario.from_h(hash[:scenario]), ) end |