Class: Cucumber::Messages::StepDefinitionPattern
- 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
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new StepDefinitionPattern from the given hash.
Instance Method Summary collapse
-
#initialize(source: '', type: StepDefinitionPatternType::CUCUMBER_EXPRESSION) ⇒ StepDefinitionPattern
constructor
A new instance of StepDefinitionPattern.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(source: '', type: StepDefinitionPatternType::CUCUMBER_EXPRESSION) ⇒ StepDefinitionPattern
Returns a new instance of StepDefinitionPattern.
1459 1460 1461 1462 1463 1464 1465 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1459 def initialize( source: '', type: StepDefinitionPatternType::CUCUMBER_EXPRESSION ) @source = source @type = type end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
1455 1456 1457 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1455 def source @source end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
1457 1458 1459 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1457 def type @type end |
Class Method Details
.from_h(hash) ⇒ Object
Returns a new StepDefinitionPattern from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::StepDefinitionPattern.from_h(some_hash) # => #<Cucumber::Messages::StepDefinitionPattern:0x... ...>
880 881 882 883 884 885 886 887 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 880 def self.from_h(hash) return nil if hash.nil? self.new( source: hash[:source], type: hash[:type], ) end |