Module: Toadie::Configuration
- Defined in:
- lib/toadie/configuration.rb
Instance Method Summary collapse
- #assets_path(filename = '') ⇒ Object
- #default_todo_markers ⇒ Object
- #file_extensions ⇒ Object
- #file_extensions=(values) ⇒ Object
- #output_dir ⇒ Object
- #output_path ⇒ Object
- #root ⇒ Object
- #test=(value) ⇒ Object
- #test? ⇒ Boolean
- #todo_markers ⇒ Object
- #todo_markers=(values) ⇒ Object
- #version ⇒ Object
Instance Method Details
#assets_path(filename = '') ⇒ Object
9 10 11 |
# File 'lib/toadie/configuration.rb', line 9 def assets_path(filename = '') File.join(Toadie.output_path, 'assets', Toadie.version, filename) end |
#default_todo_markers ⇒ Object
21 22 23 |
# File 'lib/toadie/configuration.rb', line 21 def default_todo_markers [ 'TODO' ] end |
#file_extensions ⇒ Object
17 18 19 |
# File 'lib/toadie/configuration.rb', line 17 def file_extensions @file_extensions end |
#file_extensions=(values) ⇒ Object
13 14 15 |
# File 'lib/toadie/configuration.rb', line 13 def file_extensions=(values) @file_extensions = values end |
#output_dir ⇒ Object
33 34 35 |
# File 'lib/toadie/configuration.rb', line 33 def output_dir 'toadie' end |
#output_path ⇒ Object
3 4 5 6 7 |
# File 'lib/toadie/configuration.rb', line 3 def output_path output_path = File.join(root, output_dir) FileUtils.mkdir_p output_path output_path end |
#root ⇒ Object
37 38 39 |
# File 'lib/toadie/configuration.rb', line 37 def root File.(Dir.getwd) end |
#test=(value) ⇒ Object
49 50 51 |
# File 'lib/toadie/configuration.rb', line 49 def test=(value) @test = value end |
#test? ⇒ Boolean
45 46 47 |
# File 'lib/toadie/configuration.rb', line 45 def test? @test end |
#todo_markers ⇒ Object
29 30 31 |
# File 'lib/toadie/configuration.rb', line 29 def todo_markers @todo_markers || Toadie.default_todo_markers end |
#todo_markers=(values) ⇒ Object
25 26 27 |
# File 'lib/toadie/configuration.rb', line 25 def todo_markers=(values) @todo_markers = values end |