Class: Crate::PackingList
- Inherits:
-
Object
- Object
- Crate::PackingList
- 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
-
#file_list ⇒ Object
readonly
Returns the value of attribute file_list.
-
#prefix ⇒ Object
readonly
Returns the value of attribute prefix.
Instance Method Summary collapse
-
#initialize(file_list, prefix = Dir.pwd) ⇒ PackingList
constructor
A new instance of PackingList.
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.(f) } end |
Instance Attribute Details
#file_list ⇒ Object (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 |
#prefix ⇒ Object (readonly)
Returns the value of attribute prefix.
7 8 9 |
# File 'lib/crate/packing_list.rb', line 7 def prefix @prefix end |