class GNOME2::Rake::PackageTask::DependencyConfiguration::GemConfiguration - glib2-3.1.1 Documentation

# class GNOME2::Rake::PackageTask::DependencyConfiguration::GemConfiguration

### Attributes

development[RW]
runtime[RW]

### Public Class Methods

new(package) click to toggle source

    # File lib/gnome2/rake/package-task.rb, line 307
    def initialize(package)
      @package = package
      @runtime = []
      @development = []
    end

### Public Instance Methods

append_version(dependency) click to toggle source

    # File lib/gnome2/rake/package-task.rb, line 323
    def append_version(dependency)
      name, *ver = dependency.is_a?(Array) ? dependency : [dependency]
      ver << "= #{@package.version}" if @package.ruby_gnome2_package?(name)
      [name, *ver]
    end

apply(spec) click to toggle source

    # File lib/gnome2/rake/package-task.rb, line 313
    def apply(spec)
      @runtime.each do |dependency|
        spec.add_runtime_dependency(*append_version(dependency))
      end

      @development.each do |dependency|
        spec.add_development_dependency(*append_version(dependency))
      end
    end