class Mint::Ast::Directives::FileBased
   
  - Mint::Ast::Directives::FileBased
 - Mint::Ast::Node
 - Reference
 - Object
 
Included Modules
Direct Known Subclasses
- Mint::Ast::Directives::Asset
 - Mint::Ast::Directives::HighlightFile
 - Mint::Ast::Directives::Inline
 - Mint::Ast::Directives::Svg
 
Defined in:
ast/directives/file_based.crConstructors
Instance Method Summary
- 
        #exists?
        
          
Returns whether the file exists.
 - 
        #file_contents : String
        
          
Returns the files contents.
 - 
        #filename(*, build : Bool) : String | Nil
        
          
Returns the hashed filename of the target.
 - 
        #path : String
        
          
The given path of the asset, relative to the source file.
 - 
        #real_path : Path
        
          
The real path of the asset on the disk.
 
Instance methods inherited from module Mint::Errorable
  
  
    
      error!(name : Symbol, &)
    error!, 
    
  
    
      unreachable!(message : String)
    unreachable!
    
  
    
    
    
  
    
  Instance methods inherited from class Mint::Ast::Node
  
  
    
      file : Parser::File
    file, 
    
  
    
      from : Int64
    from, 
    
  
    
      from=(from : Int64)
    from=, 
    
  
    
      location : Location
    location, 
    
  
    
      new_line?
    new_line?, 
    
  
    
      parent : Node | Nil
    parent, 
    
  
    
      parent=(parent : Node | Nil)
    parent=, 
    
  
    
      source
    source, 
    
  
    
      to : Int64
    to, 
    
  
    
      to_tuple
    to_tuple
    
  
    
  Constructor methods inherited from class Mint::Ast::Node
  
  
    
      new(file : Mint::Parser::File, from : Int64, to : Int64)
    new
    
  
    
  Class methods inherited from class Mint::Ast::Node
  
  
    
      compute_location(file : Parser::File, from, to)
    compute_location, 
    
  
    
      compute_position(lines, needle) : Position
    compute_position
    
  
    
  
    
    
    
    
  
    
    
    
    
  
Constructor Detail
Instance Method Detail
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.