Sha256: 96f5cc11384a16404fb84677f101fdb6f199f2958e201158631be9da51309f6b

Contents?: true

Size: 433 Bytes

Versions: 10

Compression:

Stored size: 433 Bytes

Contents

module Rbexy
  module ComponentProviders
    class NamespacedRbexyProvider < Rbexy::ComponentProviders::RbexyProvider
      attr_reader :namespaces

      def initialize(*namespaces)
        @namespaces = namespaces
      end

      def find(name)
        namespaces.each do |namespace|
          result = super("#{namespace}::#{name}")
          return result if result != nil
        end

        super
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rbexy-1.1.0 lib/rbexy/component_providers/namespaced_rbexy_provider.rb
rbexy-1.0.2 lib/rbexy/component_providers/namespaced_rbexy_provider.rb
rbexy-1.0.1 lib/rbexy/component_providers/namespaced_rbexy_provider.rb
rbexy-1.0.0 lib/rbexy/component_providers/namespaced_rbexy_provider.rb
rbexy-0.3.1 lib/rbexy/component_providers/namespaced_rbexy_provider.rb
rbexy-0.3.0 lib/rbexy/component_providers/namespaced_rbexy_provider.rb
rbexy-0.2.3 lib/rbexy/component_providers/namespaced_rbexy_provider.rb
rbexy-0.2.2 lib/rbexy/component_providers/namespaced_rbexy_provider.rb
rbexy-0.2.1 lib/rbexy/component_providers/namespaced_rbexy_provider.rb
rbexy-0.2.0 lib/rbexy/component_providers/namespaced_rbexy_provider.rb