class Cucumber::Messages::ParameterType
Attributes
id[R]
name[R]
The name is unique, so we don’t need an id.
prefer_for_regular_expression_match[R]
regular_expressions[R]
use_for_snippets[R]
Public Class Methods
from_h(hash)
click to toggle source
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... ...>
# File lib/cucumber/messages.deserializers.rb, line 566 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
new( name: '', regular_expressions: [], prefer_for_regular_expression_match: false, use_for_snippets: false, id: '' )
click to toggle source
# File lib/cucumber/messages.dtos.rb, line 1011 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