Class: Crate::PackingList

Inherits:
Object
  • Object
show all
Defined in:
lib/crate/packing_list.rb

Overview

encapsulate a packing list, a list of files and the prefix of those files that need to be stripped off for doing require

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_list, prefix = Dir.pwd) ⇒ PackingList

Returns a new instance of PackingList.



10
11
12
13
# File 'lib/crate/packing_list.rb', line 10

def initialize( file_list, prefix = Dir.pwd )
  @prefix = prefix
  @file_list = file_list.collect { |f| File.expand_path(f) }
end

Instance Attribute Details

#file_listObject (readonly)

Returns the value of attribute file_list.



8
9
10
# File 'lib/crate/packing_list.rb', line 8

def file_list
  @file_list
end

#prefixObject (readonly)

Returns the value of attribute prefix.



7
8
9
# File 'lib/crate/packing_list.rb', line 7

def prefix
  @prefix
end