Class: Envandle::GemspecCache::Reserved

Inherits:
Object
  • Object
show all
Defined in:
lib/envandle/gemspec_cache.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cache_path) ⇒ Reserved

Returns a new instance of Reserved.



48
49
50
51
# File 'lib/envandle/gemspec_cache.rb', line 48

def initialize(cache_path)
  @cache_path = cache_path
  @path = Envandle.tmpdir(nil, cache_path)
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



53
54
55
# File 'lib/envandle/gemspec_cache.rb', line 53

def path
  @path
end

Instance Method Details

#saveObject



59
60
61
# File 'lib/envandle/gemspec_cache.rb', line 59

def save
  GemspecCache.new(@cache_path).append @url, @path[(@cache_path.size+1)..-1]
end

#url=(v) ⇒ Object



55
56
57
# File 'lib/envandle/gemspec_cache.rb', line 55

def url=(v)
  @url = v
end