Class Gem::Builder
In: lib/rubygems/builder.rb
Parent: Object

The Builder class processes RubyGem specification files to produce a .gem file.

Methods

build   new   success  

Included Modules

Gem::UserInteraction

Public Class methods

Constructs a builder instance for the provided specification

spec:[Gem::Specification] The specification instance

[Source]

    # File lib/rubygems/builder.rb, line 27
27:   def initialize(spec)
28:     @spec = spec
29:   end

Public Instance methods

Builds the gem from the specification. Returns the name of the file written.

[Source]

    # File lib/rubygems/builder.rb, line 35
35:   def build
36:     @spec.mark_version
37:     @spec.validate
38:     @signer = sign
39:     write_package
40:     say success if Gem.configuration.verbose
41:     @spec.file_name
42:   end

[Source]

    # File lib/rubygems/builder.rb, line 44
44:   def success
45:     "Successfully built RubyGem\nName: \#{@spec.name}\nVersion: \#{@spec.version}\nFile: \#{@spec.file_name}\n"
46:   end

[Validate]