Class: Underworld::Extension::Base::ClassMethods

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

Instance Method Summary collapse

Instance Method Details

#override_generator_templates(template_path) ⇒ Object

This method tells underworld that this extension will override the generators templates of underworld from ‘template_path` location



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

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

#register_extension(name, klass) ⇒ Object



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

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