Class: JRuby::Lint::Libraries

Inherits:
Object
  • Object
show all
Defined in:
lib/jruby/lint/libraries.rb

Defined Under Namespace

Classes: CExtensions, Cache

Constant Summary collapse

SOURCES =
[CExtensions]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cache) ⇒ Libraries

Returns a new instance of Libraries.



81
82
83
# File 'lib/jruby/lint/libraries.rb', line 81

def initialize(cache)
  @sources = SOURCES.map {|s| s.new(cache) }
end

Instance Attribute Details

#gemsObject

Returns the value of attribute gems.



79
80
81
# File 'lib/jruby/lint/libraries.rb', line 79

def gems
  @gems
end

Instance Method Details

#loadObject



85
86
87
88
89
90
91
92
# File 'lib/jruby/lint/libraries.rb', line 85

def load
  @gems = {}.tap do |gems|
    @sources.each do |s|
      s.load
      gems.update(s.gems)
    end
  end
end