Class: Gem::MiniMirror::Resources::BaseFile

Inherits:
Object
  • Object
show all
Includes:
Gem::MiniMirror::Resource
Defined in:
lib/rubygems/mini_mirror/resources/base_file.rb

Direct Known Subclasses

RubyFile, Yaml

Instance Method Summary collapse

Methods included from Gem::MiniMirror::Resource

included

Constructor Details

#initialize(runner, options) ⇒ BaseFile

Returns a new instance of BaseFile.



7
8
9
10
11
12
# File 'lib/rubygems/mini_mirror/resources/base_file.rb', line 7

def initialize(runner, options)
  path = File.expand_path(options[:path])
  throw :resource_load_error, :path => path unless File.exist?(path)
  @path = path
  super
end

Instance Method Details

#tagObject



14
15
16
# File 'lib/rubygems/mini_mirror/resources/base_file.rb', line 14

def tag
  'path-' + @path
end