Class: Deproll::InstalledGem
- Inherits:
-
Object
- Object
- Deproll::InstalledGem
- Defined in:
- lib/deproll.rb
Instance Attribute Summary collapse
-
#gemspec ⇒ Object
Returns the value of attribute gemspec.
Instance Method Summary collapse
- #dependencies ⇒ Object
-
#initialize(gemspec) ⇒ InstalledGem
constructor
A new instance of InstalledGem.
- #method_missing(method, *args, &block) ⇒ Object
Constructor Details
#initialize(gemspec) ⇒ InstalledGem
Returns a new instance of InstalledGem.
55 56 57 |
# File 'lib/deproll.rb', line 55 def initialize(gemspec) @gemspec = gemspec.last end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
63 64 65 66 67 68 69 |
# File 'lib/deproll.rb', line 63 def method_missing(method, *args, &block) if gemspec.respond_to?(method) gemspec.send(method, *args, &block) else super end end |
Instance Attribute Details
#gemspec ⇒ Object
Returns the value of attribute gemspec.
53 54 55 |
# File 'lib/deproll.rb', line 53 def gemspec @gemspec end |
Instance Method Details
#dependencies ⇒ Object
59 60 61 |
# File 'lib/deproll.rb', line 59 def dependencies requirements.collect(&:first) #returns the name of a gem, e.g. 'fastthread' for Passenger end |