Module: TestFile
- Defined in:
- lib/test_file/builder.rb
Defined Under Namespace
Classes: Builder, PDFBuilder
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.included(base) ⇒ Object
4
5
6
|
# File 'lib/test_file/builder.rb', line 4
def self.included(base)
base.after { remove_test_files } if base.respond_to?(:after)
end
|
Instance Method Details
#a_file(name) ⇒ Object
8
9
10
11
|
# File 'lib/test_file/builder.rb', line 8
def a_file(name)
test_files << Builder.new(name)
test_files.last
end
|
#remove_test_files ⇒ Object
18
19
20
|
# File 'lib/test_file/builder.rb', line 18
def remove_test_files
test_files.each {|file| file.delete}
end
|
#test_files ⇒ Object
13
14
15
|
# File 'lib/test_file/builder.rb', line 13
def test_files
@test_files ||= []
end
|