Class: Stickler::GemContainer

Inherits:
Object
  • Object
show all
Defined in:
lib/stickler/gem_container.rb

Overview

Wrap the class that opens the gem file and gives access to all the gem file internals. The class that implements this in rubygems itself changed, so we need to be backwards compatible with folks that are using older versions of rubygems.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gem_file_path) ⇒ GemContainer

Returns a new instance of GemContainer.



10
11
12
13
# File 'lib/stickler/gem_container.rb', line 10

def initialize( gem_file_path )
  @path      = gem_file_path
  @container = load_container( path )
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



9
10
11
# File 'lib/stickler/gem_container.rb', line 9

def path
  @path
end

Instance Method Details

#specObject



15
16
17
# File 'lib/stickler/gem_container.rb', line 15

def spec
  @container.spec
end