struct

Noir::RailsCallbackChain::Facts

Inherits Struct < Value < Object

What a reader takes from one file: its classes and modules (by the row they open on), its defs, its class macros, the canonical text of each class-body statement by its first row, the rows that open a class, the class or module row that owns each statement, the (first, last) rows of each class and module, and whether the AST read it (ast) rather than LineReader. Shared by every chain built over one source.

Constructors

new(classes : Array(Tuple(Int32, Klass)), defs : Array(Tuple(String, Int32)), macros : Array(Tuple(String, ClassMacro)), statements : Hash(Int32, String), class_rows : Set(Int32), owners : Hash(Int32, Int32), spans : Array(Tuple(Int32, Int32)), ast : Bool)
Source

Instance methods

ast
class_rows
classes
clone
Source
copy_with(classes _classes = @classes, defs _defs = @defs, macros _macros = @macros, statements _statements = @statements, class_rows _class_rows = @class_rows, owners _owners = @owners, spans _spans = @spans, ast _ast = @ast)
Source
defs
home(row : Int32) : Int32 | Nil

The row of the innermost class or module around row.

Source
macros
owners
spans
statements