lib/manifest_handler.rb in inqlude-0.0.7 vs lib/manifest_handler.rb in inqlude-0.0.8

- old
+ new

@@ -14,18 +14,26 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. class ManifestHandler - attr_reader :manifests, :libraries, :settings + attr_reader :manifests, :settings def initialize settings @settings = settings @libraries = Array.new @manifests = Array.new end + def libraries maturity = nil + if !maturity + return @libraries + else + return @libraries.select { |l| l.manifests.last["maturity"] == maturity.to_s } + end + end + def manifest name read_remote @libraries.each do |library| if library.name == name return library.manifests.last