Class: Rbexy::ComponentProviders::NamespacedRbexyProvider

Inherits:
RbexyProvider
  • Object
show all
Defined in:
lib/rbexy/component_providers/namespaced_rbexy_provider.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RbexyProvider

#match?, #render

Constructor Details

#initialize(*namespaces) ⇒ NamespacedRbexyProvider

Returns a new instance of NamespacedRbexyProvider.



6
7
8
# File 'lib/rbexy/component_providers/namespaced_rbexy_provider.rb', line 6

def initialize(*namespaces)
  @namespaces = namespaces
end

Instance Attribute Details

#namespacesObject (readonly)

Returns the value of attribute namespaces.



4
5
6
# File 'lib/rbexy/component_providers/namespaced_rbexy_provider.rb', line 4

def namespaces
  @namespaces
end

Instance Method Details

#find(name) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/rbexy/component_providers/namespaced_rbexy_provider.rb', line 10

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

  super
end