Sha256: fdf007f4083240e8bf96ad973c141b6d40df97efaaba4d2147271e32841bb53b

Contents?: true

Size: 882 Bytes

Versions: 23

Compression:

Stored size: 882 Bytes

Contents

module Faalis
  module Extension
    # This module provide basic functionallity of a Faalis extension
    # to a rails engine.
    # It should be included in engine of all the Faalis extionsions
    module Base

      def included(base)
        extend ClassMethods
      end

      class ClassMethods
        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

        # This method tells faalis that this extension will override
        # the generators templates of faalis from `template_path` location
        def override_generator_templates(template_path)
          send(:define_singleton_method, 'generator_templates_path') do
            template_path
          end
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
faalis-2.2.0.pre.rc1 lib/faalis/extension/base.rb
faalis-2.2.1 lib/faalis/extension/base.rb
faalis-2.2.0 lib/faalis/extension/base.rb
faalis-2.1.1 lib/faalis/extension/base.rb
faalis-2.1.0 lib/faalis/extension/base.rb
faalis-2.0.8 lib/faalis/extension/base.rb
faalis-2.0.7 lib/faalis/extension/base.rb
faalis-2.0.5 lib/faalis/extension/base.rb
faalis-2.0.4 lib/faalis/extension/base.rb
faalis-2.0.3 lib/faalis/extension/base.rb
faalis-2.0.1 lib/faalis/extension/base.rb
faalis-2.0.0 lib/faalis/extension/base.rb
faalis-2.0.0.rc6 lib/faalis/extension/base.rb
faalis-2.0.0.rc5 lib/faalis/extension/base.rb
faalis-2.0.0.rc4 lib/faalis/extension/base.rb
faalis-2.0.0.rc3 lib/faalis/extension/base.rb
faalis-2.0.0.rc2 lib/faalis/extension/base.rb
faalis-1.0.0 lib/faalis/extension/base.rb
faalis-1.0.0.alpha4 lib/faalis/extension/base.rb
faalis-1.0.0.alpha3 lib/faalis/extension/base.rb