Method: LibGems::Specification.load

Defined in:
lib/libgems/specification.rb

.load(filename) ⇒ Object

Loads ruby format gemspec from filename



503
504
505
506
507
508
509
510
511
512
# File 'lib/libgems/specification.rb', line 503

def self.load(filename)
  gemspec = nil
  raise "NESTED Specification.load calls not allowed!" if @@gather
  @@gather = proc { |gs| gemspec = gs }
  data = File.read filename
  LibGems.with_rubygems_compat{ eval(data, nil, filename) }
  gemspec
ensure
  @@gather = nil
end