lib/composer/repository/composite_repository.rb in php-composer-0.4.5 vs lib/composer/repository/composite_repository.rb in php-composer-1.0.0.pre.alpha11

- old
+ new

@@ -16,11 +16,11 @@ # PHP Authors: # Beau Simensen <beau@dflydev.com> # # Ruby Authors: # Ioannis Kappas <ikappas@devworks.gr> - class CompositeRepository < Composer::Repository::BaseRepository + class CompositeRepository < ::Composer::Repository::BaseRepository # Initializes filesystem repository. # @param [Array] repositories An array of repositories. def initialize(repositories) unless repositories raise ArgumentError, @@ -112,20 +112,20 @@ def add_repository(repository) unless repository raise ArgumentError, 'repository must be specified' end - unless repository.is_a?(Composer::Repository::BaseRepository) + unless repository.is_a?(::Composer::Repository::BaseRepository) raise TypeError, 'repository type must be a \ Composer::Repository::BaseRepository or superclass' end - if repository.instance_of?(Composer::Repository::CompositeRepository) + if repository.instance_of?(::Composer::Repository::CompositeRepository) repository.repositories.each do |repo| add_repository(repo) end else - @repositories.push(repository) + @repositories.push(repository) end end end end end