Class: Faalis::Extension::Base::ClassMethods

Inherits:
Object
  • Object
show all
Defined in:
lib/faalis/extension/base.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) override_generator_templates(template_path)

This method tells faalis that this extension will override the generators templates of faalis from template_path location



21
22
23
24
25
# File 'lib/faalis/extension/base.rb', line 21

def override_generator_templates(template_path)
  send(:define_singleton_method, 'generator_templates_path') do
    template_path
  end
end

- (Object) register_extension(name, klass)



13
14
15
16
17
# File 'lib/faalis/extension/base.rb', line 13

def register_extension(name, klass)
  # TODO: Replace this mechanism with more elegant one
  #       For example use [] method or someting
  Faalis::Extension.extensions[name] = klass
end