Module: Sprout::RubyFeature

Extended by:
Concern
Included in:
Executable, Generator, Library
Defined in:
lib/sprout/ruby_feature.rb

Overview

This class represents a Feature that is written in Ruby code that exists on the other side of the Ruby load path.

The idea here, is that one can include the Sprout::RubyFeature module into their concrete class, and then accept requests to register and load from clients that are interested in pluggable features.

An example is as follows:


    require 'sprout'

    class MyClass
      include Sprout::RubyFeature
    end

In some other Ruby file:


    MyClass.load :other, 'other_gem', '>= 1.0pre'

In the desired Ruby file:


    class OtherClass
      include Sprout::Executable

      set :name, :other
      set :pkg_name, 'other_gem'
      set :pkg_version, '1.0.pre'

      # do something...
    end

    MyClass.register OtherClass.new

Defined Under Namespace

Modules: ClassMethods

Method Summary

Methods included from Concern

append_features, extended, included