Class: Cucumber::Messages::StepDefinition
- 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
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
-
#source_reference ⇒ Object
readonly
Returns the value of attribute source_reference.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new StepDefinition from the given hash.
Instance Method Summary collapse
-
#initialize(id: '', pattern: StepDefinitionPattern.new, source_reference: SourceReference.new) ⇒ StepDefinition
constructor
A new instance of StepDefinition.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(id: '', pattern: StepDefinitionPattern.new, source_reference: SourceReference.new) ⇒ StepDefinition
Returns a new instance of StepDefinition.
1435 1436 1437 1438 1439 1440 1441 1442 1443 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1435 def initialize( id: '', pattern: StepDefinitionPattern.new, source_reference: SourceReference.new ) @id = id @pattern = pattern @source_reference = source_reference end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
1429 1430 1431 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1429 def id @id end |
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
1431 1432 1433 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1431 def pattern @pattern end |
#source_reference ⇒ Object (readonly)
Returns the value of attribute source_reference.
1433 1434 1435 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1433 def source_reference @source_reference end |
Class Method Details
.from_h(hash) ⇒ Object
Returns a new StepDefinition from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::StepDefinition.from_h(some_hash) # => #<Cucumber::Messages::StepDefinition:0x... ...>
859 860 861 862 863 864 865 866 867 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 859 def self.from_h(hash) return nil if hash.nil? self.new( id: hash[:id], pattern: StepDefinitionPattern.from_h(hash[:pattern]), source_reference: SourceReference.from_h(hash[:sourceReference]), ) end |