Module: Ruty::Tags

Defined in:
lib/ruty/tags.rb

Overview

builtin tags

Defined Under Namespace

Classes: Block, Capture, Cycle, Debug, Extends, Filter, ForLoop, If, IfChanged, Include

Class Method Summary collapse

Class Method Details

.[](name) ⇒ Object

function for quickly looking up tags by name



21
22
23
# File 'lib/ruty/tags.rb', line 21

def [] name
  @tags[name]
end

.allObject

array of all known tags by name



26
27
28
# File 'lib/ruty/tags.rb', line 26

def all
  @tags.keys
end

.register(tag, name) ⇒ Object

function used for registering a new tag.



31
32
33
# File 'lib/ruty/tags.rb', line 31

def register tag, name
  @tags[name] = tag
end

.unregister(name) ⇒ Object

function used to unregister a function



36
37
38
# File 'lib/ruty/tags.rb', line 36

def unregister name
  @tags.delete(name)
end