Class: Warbler::Runtime::Spec
- Inherits:
-
Object
- Object
- Warbler::Runtime::Spec
- Defined in:
- lib/warbler/runtime.rb
Instance Method Summary collapse
-
#initialize(spec, gem_path) ⇒ Spec
constructor
A new instance of Spec.
- #inspect ⇒ Object
Constructor Details
#initialize(spec, gem_path) ⇒ Spec
Returns a new instance of Spec.
13 14 15 16 17 18 19 |
# File 'lib/warbler/runtime.rb', line 13 def initialize(spec, gem_path) location = spec[:loaded_from][%r{(.*)/specifications}, 1] spec = spec.dup spec[:loaded_from] = spec[:loaded_from].sub(location, gem_path) spec[:load_paths] = spec[:load_paths].map {|p| p.sub(location, gem_path)} @spec = spec end |
Instance Method Details
#inspect ⇒ Object
21 22 23 24 |
# File 'lib/warbler/runtime.rb', line 21 def inspect str = @spec.inspect str.gsub(%r'"/WEB-INF(/[^"]*)"', 'File.expand_path("../..\1", __FILE__)') end |