class Solargraph::Location
A section of text identified by its filename and range.
Attributes
filename[R]
@return [String]
range[R]
@return [Solargraph::Range]
Public Class Methods
new(filename, range)
click to toggle source
@param filename [String] @param range [Solargraph::Range]
# File lib/solargraph/location.rb, line 14 def initialize filename, range @filename = filename @range = range end
Public Instance Methods
==(other)
click to toggle source
# File lib/solargraph/location.rb, line 27 def == other return false unless other.is_a?(Location) filename == other.filename and range == other.range end
inspect()
click to toggle source
# File lib/solargraph/location.rb, line 32 def inspect "#<#{self.class} #{filename}, #{range.inspect}>" end
to_hash()
click to toggle source
@return [Hash]
# File lib/solargraph/location.rb, line 20 def to_hash { filename: filename, range: range.to_hash } end