Class: ConcordionEnvironment
- Inherits:
-
Object
- Object
- ConcordionEnvironment
- Defined in:
- lib/concordion_environment.rb
Class Method Summary collapse
- .clean_list ⇒ Object
-
.css_type ⇒ Object
TODO dry this up.
- .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
TODO dry this up
19 20 21 22 |
# File 'lib/concordion_environment.rb', line 19 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
24 25 26 27 |
# File 'lib/concordion_environment.rb', line 24 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 |