Class: Deproll::InstalledGem

Inherits:
Object
  • Object
show all
Defined in:
lib/deproll.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#gemspecObject

Returns the value of attribute gemspec.



53
54
55
# File 'lib/deproll.rb', line 53

def gemspec
  @gemspec
end

Instance Method Details

#dependenciesObject



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