Class: Lono::Extensions

Inherits:
Object
  • Object
show all
Includes:
Dsl, Template::Evaluate
Defined in:
lib/lono/extensions.rb,
lib/lono/extensions/dsl.rb,
lib/lono/extensions/loader.rb,
lib/lono/extensions/preparer.rb,
lib/lono/extensions/register.rb

Defined Under Namespace

Modules: Dsl, Loader Classes: Preparer, Register

Instance Method Summary collapse

Methods included from Template::Evaluate

#evaluate_template_path, #template_evaluation_error

Methods included from Dsl

#extend_with, #register_extension_helper

Constructor Details

#initialize(template_path) ⇒ Extensions

Returns a new instance of Extensions.



6
7
8
# File 'lib/lono/extensions.rb', line 6

def initialize(template_path)
  @template_path = template_path
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object

The extend_with methods are used in file as the normal DSL evaluation. We use method_missing so we dont have to redefine all the normal methods of the DSL.



16
# File 'lib/lono/extensions.rb', line 16

def method_missing(name, *args, &block); end

Instance Method Details

#evaluateObject



10
11
12
# File 'lib/lono/extensions.rb', line 10

def evaluate
  evaluate_template_path(@template_path) # handle extend_with
end