Class: ActiveScripts::Package
- Inherits:
-
Object
- Object
- ActiveScripts::Package
- Defined in:
- lib/active_scripts/package.rb
Constant Summary collapse
- PACKAGES =
INFO: ActiveScripts::Package contains code that is
for retrieving and validating packages. Dir.entries("#{File.dirname(__FILE__)}/packages") .drop(2) .reject { |f| ["base.rb"].include?(f) } .map { |f| File.basename(f, ".rb") }
Instance Attribute Summary collapse
-
#packages ⇒ Object
Returns the value of attribute packages.
Class Method Summary collapse
Instance Method Summary collapse
- #find ⇒ Object
-
#initialize(packages = []) ⇒ Package
constructor
A new instance of Package.
Constructor Details
#initialize(packages = []) ⇒ Package
Returns a new instance of Package.
14 15 16 |
# File 'lib/active_scripts/package.rb', line 14 def initialize(packages=[]) @packages = packages end |
Instance Attribute Details
#packages ⇒ Object
Returns the value of attribute packages.
12 13 14 |
# File 'lib/active_scripts/package.rb', line 12 def packages @packages end |
Class Method Details
.find(packages = []) ⇒ Object
18 19 20 |
# File 'lib/active_scripts/package.rb', line 18 def self.find(packages=[]) new(packages).find end |
Instance Method Details
#find ⇒ Object
22 23 24 25 |
# File 'lib/active_scripts/package.rb', line 22 def find @packages.blank? ? say(" - Package skipped!") : assert_valid_packages! return(@packages.strip) end |