Class: Citrus::GlobalFunctions
- Inherits:
-
Object
- Object
- Citrus::GlobalFunctions
- Defined in:
- lib/citrus/compiler/function.rb
Class Method Summary collapse
Class Method Details
.add(name, args) ⇒ Object
70 71 72 |
# File 'lib/citrus/compiler/function.rb', line 70 def self.add(name, args) return @functions[name] = Function.new(name, args, @module) { |g| yield g if block_given? } end |
.init(mod) ⇒ Object
65 66 67 68 |
# File 'lib/citrus/compiler/function.rb', line 65 def self.init(mod) @module ||= mod @functions ||= {} end |
.named(name) ⇒ Object
74 75 76 |
# File 'lib/citrus/compiler/function.rb', line 74 def self.named(name) return @functions[name] end |