struct SourceContext

Defined in:

models/framework_tagger.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(path : String, line : Int32 | Nil, full_content : String, lines : Array(String) | Nil = nil) #

[View source]

Instance Method Detail

def full_content : String #

[View source]
def full_content=(full_content : String) #

[View source]
def line : Int32 | Nil #

[View source]
def line=(line : Int32 | Nil) #

[View source]
def lines : Array(String) #

The file as lines. Every consumer of read_source_context immediately splits #full_content to walk backwards from the endpoint's line, and a controller declares many handlers — so splitting per endpoint re-did the same work once per endpoint per tagger. read_source_context passes the tagger's cached (shared, read-only) array instead.


[View source]
def path : String #

[View source]
def path=(path : String) #

[View source]