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.



90
91
92
# File 'lib/jruby/lint/libraries.rb', line 90

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

Instance Attribute Details

#gemsObject (readonly)

Returns the value of attribute gems.



88
89
90
# File 'lib/jruby/lint/libraries.rb', line 88

def gems
  @gems
end

Instance Method Details

#loadObject



94
95
96
97
98
99
100
101
# File 'lib/jruby/lint/libraries.rb', line 94

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