Class: Cucumber::Messages::UndefinedParameterType
- Defined in:
- lib/cucumber/messages/undefined_parameter_type.rb
Overview
Represents the UndefinedParameterType message in Cucumber’s message protocol.
Instance Attribute Summary collapse
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new UndefinedParameterType from the given hash.
Instance Method Summary collapse
-
#initialize(expression: '', name: '') ⇒ UndefinedParameterType
constructor
A new instance of UndefinedParameterType.
Methods inherited from Message
camelize, from_json, #to_h, #to_json
Constructor Details
#initialize(expression: '', name: '') ⇒ UndefinedParameterType
Returns a new instance of UndefinedParameterType.
15 16 17 18 19 20 21 22 |
# File 'lib/cucumber/messages/undefined_parameter_type.rb', line 15 def initialize( expression: '', name: '' ) @expression = expression @name = name super() end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
11 12 13 |
# File 'lib/cucumber/messages/undefined_parameter_type.rb', line 11 def expression @expression end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
13 14 15 |
# File 'lib/cucumber/messages/undefined_parameter_type.rb', line 13 def name @name end |
Class Method Details
.from_h(hash) ⇒ Object
Returns a new UndefinedParameterType from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::UndefinedParameterType.from_h(some_hash) # => #<Cucumber::Messages::UndefinedParameterType:0x... ...>
31 32 33 34 35 36 37 38 |
# File 'lib/cucumber/messages/undefined_parameter_type.rb', line 31 def self.from_h(hash) return nil if hash.nil? new( expression: hash[:expression], name: hash[:name] ) end |