class Crinja::Tag::Library

Defined in:

lib/tag.cr

Constant Summary

TAGS = [If, If::Else, If::Elif, For, Set, Filter, With, Autoescape, Macro, Call, Raw, Include, From, Import, Extends, Block, Do]

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Crinja::FeatureLibrary(Crinja::Tag)

<<(classes : Array(Class))
<<(klass : Class)
<<(obj : T)
<<
, [](lookup) : T [], []=(name, klass : Class)
[]=(name, obj : T)
[]=
, aliases : Hash(String, String) aliases, disabled : Array(String) disabled, each(*args, **options)
each(*args, **options, &)
each
, has_key?(name) has_key?, inspect(io : IO) inspect, keys(*args, **options)
keys(*args, **options, &)
keys
, name name, register_defaults register_defaults, size(*args, **options)
size(*args, **options, &)
size

Constructor methods inherited from class Crinja::FeatureLibrary(Crinja::Tag)

new(register_defaults = true, disabled : Array(String) = [] of String) new

Constructor Detail

def self.new(register_defaults = true, disabled = [] of String) #

Creates a new feature library. If register_defaults is set to false, this library will be empty. Otherwise it is populated with registered default features. A list of disabled features can be provided, if a feature name in this list is accessed, it will raise a SecurityError.


[View source]

Class Method Detail

def self.alias(from, to) #

[View source]
def self.defaults #

Instance Method Detail

def <<(tag) #

[View source]
def register_defaults #

Create a local method in a subclass to allow the usage of previous_def.


[View source]