Class: Cucumber::Messages::Location
- 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
Overview
Represents the Location message in Cucumber’s message protocol.
*
Points to a line and a column in a text file
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Class Method Summary collapse
-
.from_h(hash) ⇒ Object
Returns a new Location from the given hash.
Instance Method Summary collapse
-
#initialize(line: 0, column: nil) ⇒ Location
constructor
A new instance of Location.
Methods included from Message::Utils
Methods included from Message::Serialization
Methods included from Message::Deserialization
Constructor Details
#initialize(line: 0, column: nil) ⇒ Location
Returns a new instance of Location.
830 831 832 833 834 835 836 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 830 def initialize( line: 0, column: nil ) @line = line @column = column end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
828 829 830 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 828 def column @column end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
826 827 828 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.dtos.rb', line 826 def line @line end |
Class Method Details
.from_h(hash) ⇒ Object
459 460 461 462 463 464 465 466 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-messages-18.0.0/lib/cucumber/messages.deserializers.rb', line 459 def self.from_h(hash) return nil if hash.nil? self.new( line: hash[:line], column: hash[:column], ) end |