Class: Cucumber::Messages::ParseError
- 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
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new ParseError from the given hash.
Instance Method Summary collapse
-
#initialize(source: SourceReference.new, message: '') ⇒ ParseError
constructor
A new instance of ParseError.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(source: SourceReference.new, message: '') ⇒ ParseError
Returns a new instance of ParseError.
1043 1044 1045 1046 1047 1048 1049 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1043 def initialize( source: SourceReference.new, message: '' ) @source = source @message = end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
1041 1042 1043 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1041 def @message end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
1039 1040 1041 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 1039 def source @source end |
Class Method Details
.from_h(hash) ⇒ Object
Returns a new ParseError from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.
Cucumber::Messages::ParseError.from_h(some_hash) # => #<Cucumber::Messages::ParseError:0x... ...>
590 591 592 593 594 595 596 597 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 590 def self.from_h(hash) return nil if hash.nil? self.new( source: SourceReference.from_h(hash[:source]), message: hash[:message], ) end |