Class: Expert::ClasspathFile

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(paths) ⇒ ClasspathFile

Returns a new instance of ClasspathFile.



19
20
21
# File 'lib/expert/classpath_file.rb', line 19

def initialize(paths)
  @paths = paths
end

Instance Attribute Details

#pathsObject (readonly)

Returns the value of attribute paths.



5
6
7
# File 'lib/expert/classpath_file.rb', line 5

def paths
  @paths
end

Class Method Details

.from_path(path) ⇒ Object



8
9
10
# File 'lib/expert/classpath_file.rb', line 8

def from_path(path)
  new(load(path))
end

Instance Method Details

#require_allObject



23
24
25
# File 'lib/expert/classpath_file.rb', line 23

def require_all
  paths.each { |p| Kernel.require(p) }
end