Class: Bidi2pdf::TestHelpers::Configuration
- Inherits:
-
Object
- Object
- Bidi2pdf::TestHelpers::Configuration
- Defined in:
- lib/bidi2pdf/test_helpers/configuration.rb
Instance Attribute Summary collapse
-
#docker_dir ⇒ String
The directory for Docker files.
-
#fixture_dir ⇒ String
The directory for fixture files.
-
#prefix ⇒ String
The prefix for temporary files.
-
#spec_dir ⇒ Pathname
The directory where specs are located.
-
#tmp_dir ⇒ String
The directory for temporary files.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/bidi2pdf/test_helpers/configuration.rb', line 26 def initialize project_root = if defined?(Rails) && Rails.respond_to?(:root) Pathname.new(Rails.root) elsif defined?(Bundler) && Bundler.respond_to?(:root) Pathname.new(Bundler.root) else Pathname.new(Dir.pwd) end @spec_dir = project_root.join("spec"). @docker_dir = project_root.join("docker") @fixture_dir = project_root.join("spec", "fixtures") @tmp_dir = project_root.join("tmp") @prefix = "tmp_" end |
Instance Attribute Details
#docker_dir ⇒ String
Returns the directory for Docker files.
20 21 22 |
# File 'lib/bidi2pdf/test_helpers/configuration.rb', line 20 def docker_dir @docker_dir end |
#fixture_dir ⇒ String
Returns the directory for fixture files.
24 25 26 |
# File 'lib/bidi2pdf/test_helpers/configuration.rb', line 24 def fixture_dir @fixture_dir end |
#prefix ⇒ String
Returns the prefix for temporary files.
16 17 18 |
# File 'lib/bidi2pdf/test_helpers/configuration.rb', line 16 def prefix @prefix end |
#spec_dir ⇒ Pathname
Returns the directory where specs are located.
8 9 10 |
# File 'lib/bidi2pdf/test_helpers/configuration.rb', line 8 def spec_dir @spec_dir end |
#tmp_dir ⇒ String
Returns the directory for temporary files.
12 13 14 |
# File 'lib/bidi2pdf/test_helpers/configuration.rb', line 12 def tmp_dir @tmp_dir end |