class Crinja::Function::Library

Defined in:

lib/function.cr

Constructors

Class Method Summary

Instance Method Summary

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

<<(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::Callable)

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 register_defaults #

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


[View source]