Class: Evm::Command::Use
- Inherits:
-
Object
- Object
- Evm::Command::Use
- Defined in:
- lib/evm/command/use.rb
Instance Method Summary collapse
-
#initialize(argv, options = {}) ⇒ Use
constructor
A new instance of Use.
Constructor Details
#initialize(argv, options = {}) ⇒ Use
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/evm/command/use.rb', line 4 def initialize(argv, = {}) package_name = argv[0] unless package_name raise Evm::Exception.new('The use command requires an argument') end package = Evm::Package.find(package_name) if package.installed? package.use! else raise Evm::Exception.new("Package not installed: #{package_name}") end end |