Module: Kindah
- Defined in:
- lib/kindah.rb,
lib/kindah/cache.rb,
lib/kindah/version.rb,
lib/kindah/compiler.rb,
lib/kindah/ast/class_methods.rb,
lib/kindah/ast/class_template.rb,
lib/kindah/ast/instance_methods.rb
Defined Under Namespace
Classes: Cache, ClassMethods, ClassTemplate, Compiler, InstanceMethods
Constant Summary
collapse
- VERSION =
"0.0.2"
Class Method Summary
collapse
Class Method Details
.class_template(name, opts = {}, &block) ⇒ Object
12
13
14
|
# File 'lib/kindah.rb', line 12
def self.class_template(name, opts={}, &block)
Kindah::ClassTemplate.new(name, opts.merge(parent: nil), &block)
end
|
.class_template!(name, opts = {}, &block) ⇒ Object
16
17
18
|
# File 'lib/kindah.rb', line 16
def self.class_template!(name, opts={}, &block)
compile! class_template(name, opts, &block), opts.delete(:location) || Object
end
|
.compile!(template, location = Object) ⇒ Object
20
21
22
|
# File 'lib/kindah.rb', line 20
def self.compile!(template, location = Object)
Kindah::Compiler.new(template).compile!(location)
end
|