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
Public Class Methods
Source
# File lib/cucumber/messages/location.rb, line 33 def self.from_h(hash) return nil if hash.nil? new( line: hash[:line], column: hash[:column] ) end
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... ...>
Source
# File lib/cucumber/messages/location.rb, line 17 def initialize( line: 0, column: nil ) @line = line @column = column super() end
Calls superclass method