Class: Sprinkle::Installers::Gem
- Defined in:
- lib/sprinkle/installers/gem.rb
Instance Attribute Summary collapse
-
#gem ⇒ Object
Returns the value of attribute gem.
Attributes inherited from Installer
#delivery, #options, #package, #post, #pre
Instance Method Summary collapse
-
#initialize(parent, gem, options = {}, &block) ⇒ Gem
constructor
A new instance of Gem.
- #source(location = nil) ⇒ Object
Methods inherited from Installer
#defaults, #method_missing, #process
Constructor Details
#initialize(parent, gem, options = {}, &block) ⇒ Gem
6 7 8 9 |
# File 'lib/sprinkle/installers/gem.rb', line 6 def initialize(parent, gem, = {}, &block) super parent, , &block @gem = gem end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Sprinkle::Installers::Installer
Instance Attribute Details
#gem ⇒ Object
Returns the value of attribute gem.
4 5 6 |
# File 'lib/sprinkle/installers/gem.rb', line 4 def gem @gem end |
Instance Method Details
#source(location = nil) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/sprinkle/installers/gem.rb', line 11 def source(location = nil) # package defines an installer called source so here we specify a method directly # rather than rely on the automatic options processing since packages' method missing # won't be run return [:source] unless location [:source] = location end |