class Mint::Ast::Directives::FileBased

Included Modules

Direct Known Subclasses

Defined in:

ast/directives/file_based.cr

Constructors

Instance Method Summary

Instance methods inherited from module Mint::Errorable

error!(name : Symbol, &) error!, unreachable!(message : String) unreachable!

Instance methods inherited from class Mint::Ast::Node

contains?(line : Int64, column : Int64)
contains?(line : Int64)
contains?
, file : Parser::File file, from : Parser::Location from, from=(from : Parser::Location) from=, new_line? new_line?, parent : Node | Nil parent, parent=(parent : Node | Nil) parent=, source : String source, to : Parser::Location to

Constructor methods inherited from class Mint::Ast::Node

new(file : Mint::Parser::File, from : Mint::Parser::Location, to : Mint::Parser::Location) new

Constructor Detail

def self.new(from : Parser::Location, to : Parser::Location, file : Parser::File, path : String) #

[View source]

Instance Method Detail

def exists? #

Returns whether the file exists.


[View source]
def file_contents : String #

Returns the files contents.


[View source]
def filename(*, build : Bool) : String | Nil #

Returns the hashed filename of the target. For the build version it uses the the file contents as the hash value to make sure that the file will not be cached.


[View source]
def path : String #

The given path of the asset, relative to the source file.


[View source]
def real_path : Path #

The real path of the asset on the disk.


[View source]
def relative_path : String #

The relative path of the asset to the project root (closest mint.json).


[View source]