Class: Shenandoah::DefaultLocator

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

Direct Known Subclasses

Buildr::Locator, Rails::Locator

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ DefaultLocator

Returns a new instance of DefaultLocator.



7
8
9
10
11
# File 'lib/shenandoah/locator.rb', line 7

def initialize(options = {})
  @main_path = File.expand_path(options[:main_path] || "lib")
  @spec_path = File.expand_path(options[:spec_path] || "spec")
  @tmp_path = File.expand_path(options[:tmp_path] || ENV['TMPDIR'] || "tmp")
end

Instance Attribute Details

#main_pathObject

Returns the value of attribute main_path.



5
6
7
# File 'lib/shenandoah/locator.rb', line 5

def main_path
  @main_path
end

#spec_pathObject

Returns the value of attribute spec_path.



5
6
7
# File 'lib/shenandoah/locator.rb', line 5

def spec_path
  @spec_path
end

#tmp_pathObject

Returns the value of attribute tmp_path.



5
6
7
# File 'lib/shenandoah/locator.rb', line 5

def tmp_path
  @tmp_path
end

Instance Method Details

#spec_filesObject



13
14
15
# File 'lib/shenandoah/locator.rb', line 13

def spec_files
  FileList["#{spec_path}/**/*_spec.js"]
end