Class: ConcordionEnvironment

Inherits:
Object
  • Object
show all
Defined in:
lib/concordion_environment.rb

Class Method Summary collapse

Class Method Details

.clean_listObject



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_typeObject

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_keyObject



7
8
9
# File 'lib/concordion_environment.rb', line 7

def self.css_type_key
  'RCOR_CSS_TYPE'
end

.output_dirObject



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_keyObject



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