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/location.rb, line 34 def self.from_h(hash) return nil if hash.nil? new( line: hash[:line], column: hash[:column] ) end
new( line: 0, column: nil )
click to toggle source
Calls superclass method
# File lib/cucumber/messages/location.rb, line 18 def initialize( line: 0, column: nil ) @line = line @column = column super() end