Class: Cucumber::Messages::ParameterType
- 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.
-
#name ⇒ Object
readonly
The name is unique, so we don’t need an id.
-
#prefer_for_regular_expression_match ⇒ Object
readonly
Returns the value of attribute prefer_for_regular_expression_match.
-
#regular_expressions ⇒ Object
readonly
Returns the value of attribute regular_expressions.
-
#use_for_snippets ⇒ Object
readonly
Returns the value of attribute use_for_snippets.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new ParameterType from the given hash.
Instance Method Summary collapse
-
#initialize(name: '', regular_expressions: [], prefer_for_regular_expression_match: false, use_for_snippets: false, id: '') ⇒ ParameterType
constructor
A new instance of ParameterType.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(name: '', regular_expressions: [], prefer_for_regular_expression_match: false, use_for_snippets: false, id: '') ⇒ ParameterType
Returns a new instance of ParameterType.
1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1015 def initialize( name: '', regular_expressions: [], prefer_for_regular_expression_match: false, use_for_snippets: false, id: '' ) @name = name @regular_expressions = regular_expressions @prefer_for_regular_expression_match = prefer_for_regular_expression_match @use_for_snippets = use_for_snippets @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
1013 1014 1015 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1013 def id @id end |
#name ⇒ Object (readonly)
The name is unique, so we don’t need an id.
1005 1006 1007 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1005 def name @name end |
#prefer_for_regular_expression_match ⇒ Object (readonly)
Returns the value of attribute prefer_for_regular_expression_match.
1009 1010 1011 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1009 def prefer_for_regular_expression_match @prefer_for_regular_expression_match end |
#regular_expressions ⇒ Object (readonly)
Returns the value of attribute regular_expressions.
1007 1008 1009 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1007 def regular_expressions @regular_expressions end |
#use_for_snippets ⇒ Object (readonly)
Returns the value of attribute use_for_snippets.
1011 1012 1013 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1011 def use_for_snippets @use_for_snippets end |
Class Method Details
.from_h(hash) ⇒ Object
Returns a new ParameterType from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::ParameterType.from_h(some_hash) # => #<Cucumber::Messages::ParameterType:0x... ...>
567 568 569 570 571 572 573 574 575 576 577 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 567 def self.from_h(hash) return nil if hash.nil? self.new( name: hash[:name], regular_expressions: hash[:regularExpressions], prefer_for_regular_expression_match: hash[:preferForRegularExpressionMatch], use_for_snippets: hash[:useForSnippets], id: hash[:id], ) end |