Class: Jasmine::YamlConfigParser
- Inherits:
-
Object
- Object
- Jasmine::YamlConfigParser
- Defined in:
- lib/jasmine/yaml_config_parser.rb
Instance Method Summary collapse
- #css_files ⇒ Object
- #helpers ⇒ Object
-
#initialize(path, pwd, path_expander = lambda {}, yaml_loader = lambda {}) ⇒ YamlConfigParser
constructor
A new instance of YamlConfigParser.
- #jasmine_css_files ⇒ Object
- #jasmine_dir ⇒ Object
- #jasmine_files ⇒ Object
- #spec_dir ⇒ Object
- #spec_files ⇒ Object
- #spec_helper ⇒ Object
- #src_dir ⇒ Object
- #src_files ⇒ Object
Constructor Details
#initialize(path, pwd, path_expander = lambda {}, yaml_loader = lambda {}) ⇒ YamlConfigParser
Returns a new instance of YamlConfigParser.
3 4 5 6 7 8 |
# File 'lib/jasmine/yaml_config_parser.rb', line 3 def initialize(path, pwd, = lambda {}, yaml_loader = lambda {}) @path = path @path_expander = @pwd = pwd @yaml_loader = yaml_loader end |
Instance Method Details
#css_files ⇒ Object
45 46 47 |
# File 'lib/jasmine/yaml_config_parser.rb', line 45 def css_files @path_expander.call(src_dir, loaded_yaml['stylesheets'] || []) end |
#helpers ⇒ Object
41 42 43 |
# File 'lib/jasmine/yaml_config_parser.rb', line 41 def helpers @path_expander.call(spec_dir, loaded_yaml['helpers'] || []) end |
#jasmine_css_files ⇒ Object
33 34 35 |
# File 'lib/jasmine/yaml_config_parser.rb', line 33 def jasmine_css_files @path_expander.call(jasmine_dir, loaded_yaml['jasmine_css_files'] || []) end |
#jasmine_dir ⇒ Object
20 21 22 23 |
# File 'lib/jasmine/yaml_config_parser.rb', line 20 def jasmine_dir return nil unless loaded_yaml['jasmine_dir'] File.join(@pwd, loaded_yaml['jasmine_dir']) end |
#jasmine_files ⇒ Object
29 30 31 |
# File 'lib/jasmine/yaml_config_parser.rb', line 29 def jasmine_files @path_expander.call(jasmine_dir, loaded_yaml['jasmine_files'] || []) end |
#spec_dir ⇒ Object
15 16 17 18 |
# File 'lib/jasmine/yaml_config_parser.rb', line 15 def spec_dir return File.join(@pwd, 'spec', 'javascripts') unless loaded_yaml['spec_dir'] File.join(@pwd, loaded_yaml['spec_dir']) end |
#spec_files ⇒ Object
37 38 39 |
# File 'lib/jasmine/yaml_config_parser.rb', line 37 def spec_files @path_expander.call(spec_dir, loaded_yaml['spec_files'] || []) end |
#spec_helper ⇒ Object
49 50 51 |
# File 'lib/jasmine/yaml_config_parser.rb', line 49 def spec_helper File.join(@pwd, loaded_yaml['spec_helper'] || File.join('spec', 'javascripts', 'support', 'jasmine_helper.rb')) end |
#src_dir ⇒ Object
10 11 12 13 |
# File 'lib/jasmine/yaml_config_parser.rb', line 10 def src_dir return @pwd unless loaded_yaml['src_dir'] File.join(@pwd, loaded_yaml['src_dir']) end |
#src_files ⇒ Object
25 26 27 |
# File 'lib/jasmine/yaml_config_parser.rb', line 25 def src_files @path_expander.call(src_dir, loaded_yaml['src_files'] || []) end |