Class: Concordion::Environment
- Inherits:
-
Object
- Object
- Concordion::Environment
- Defined in:
- lib/concordion/environment.rb
Class Method Summary collapse
- .clean_list ⇒ Object
- .css_type ⇒ Object
- .css_type_key ⇒ Object
- .output_dir ⇒ Object
- .output_dir_key ⇒ Object
- .with_dir(str) ⇒ Object
Class Method Details
.clean_list ⇒ Object
14 15 16 |
# File 'lib/concordion/environment.rb', line 14 def self.clean_list [with_dir("*_test_output.html"), with_dir("concordion.css")] #TODO is this safe to delete? what if the user overwrites this file? end |
.css_type ⇒ Object
18 19 20 21 |
# File 'lib/concordion/environment.rb', line 18 def self.css_type type = ENV[css_type_key] type.nil? ? :inline : type.to_sym end |
.css_type_key ⇒ Object
7 8 9 |
# File 'lib/concordion/environment.rb', line 7 def self.css_type_key 'RCOR_CSS_TYPE' end |
.output_dir ⇒ Object
23 24 25 26 |
# File 'lib/concordion/environment.rb', line 23 def self.output_dir dir = ENV[output_dir_key] dir.nil? ? "." : dir end |
.output_dir_key ⇒ Object
3 4 5 |
# File 'lib/concordion/environment.rb', line 3 def self.output_dir_key 'RCOR_OUTPUT_DIR' end |
.with_dir(str) ⇒ Object
11 12 13 |
# File 'lib/concordion/environment.rb', line 11 def self.with_dir(str) File.join(output_dir, str) end |