class Cucumber::Messages::Location

Represents the Location message in Cucumber's message protocol.

*

Points to a line and a column in a text file

Attributes

column[R]
line[R]

Public Class Methods

from_h(hash) click to toggle source

Returns a new Location from the given hash. If the hash keys are camelCased, they are properly assigned to the corresponding snake_cased attributes.

Cucumber::Messages::Location.from_h(some_hash) # => #<Cucumber::Messages::Location:0x... ...>
# File lib/cucumber/messages.deserializers.rb, line 480
def self.from_h(hash)
  return nil if hash.nil?

  self.new(
    line: hash[:line],
    column: hash[:column],
  )
end
new( line: 0, column: nil ) click to toggle source
# File lib/cucumber/messages.dtos.rb, line 868
def initialize(
  line: 0,
  column: nil
)
  @line = line
  @column = column
end