Class: Expert::Environment
- Inherits:
-
Object
- Object
- Expert::Environment
- Defined in:
- lib/expert/environment.rb
Instance Attribute Summary collapse
-
#classpath ⇒ Object
readonly
Returns the value of attribute classpath.
-
#jarfile ⇒ Object
readonly
Returns the value of attribute jarfile.
-
#pom ⇒ Object
readonly
Returns the value of attribute pom.
Instance Method Summary collapse
-
#initialize(jarfile, pom, classpath) ⇒ Environment
constructor
A new instance of Environment.
- #install ⇒ Object
- #installed? ⇒ Boolean
- #require_all ⇒ Object
Constructor Details
#initialize(jarfile, pom, classpath) ⇒ Environment
Returns a new instance of Environment.
9 10 11 12 13 |
# File 'lib/expert/environment.rb', line 9 def initialize(jarfile, pom, classpath) @jarfile = jarfile @pom = pom @classpath = classpath end |
Instance Attribute Details
#classpath ⇒ Object (readonly)
Returns the value of attribute classpath.
7 8 9 |
# File 'lib/expert/environment.rb', line 7 def classpath @classpath end |
#jarfile ⇒ Object (readonly)
Returns the value of attribute jarfile.
7 8 9 |
# File 'lib/expert/environment.rb', line 7 def jarfile @jarfile end |
#pom ⇒ Object (readonly)
Returns the value of attribute pom.
7 8 9 |
# File 'lib/expert/environment.rb', line 7 def pom @pom end |
Instance Method Details
#install ⇒ Object
15 16 17 18 |
# File 'lib/expert/environment.rb', line 15 def install install_pom install_classpath end |
#installed? ⇒ Boolean
20 21 22 |
# File 'lib/expert/environment.rb', line 20 def installed? pom && classpath end |
#require_all ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/expert/environment.rb', line 24 def require_all if installed? classpath.require_all else raise DependenciesNotInstalledError, "Maven dependencies haven't been installed yet (did you forget to "\ "run `expert install`?)" end end |