Class: Dobro::FileSystemResolver

Inherits:
ActionView::FileSystemResolver
  • Object
show all
Defined in:
lib/dobro/file_system_resolver.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, resource) ⇒ FileSystemResolver

Returns a new instance of FileSystemResolver.



4
5
6
7
8
# File 'lib/dobro/file_system_resolver.rb', line 4

def initialize(path, resource)
  @resource = resource

  super path
end

Instance Attribute Details

#resourceObject (readonly)

Returns the value of attribute resource.



2
3
4
# File 'lib/dobro/file_system_resolver.rb', line 2

def resource
  @resource
end

Instance Method Details

#find_templates(name, prefix, partial, details) ⇒ Object



10
11
12
13
# File 'lib/dobro/file_system_resolver.rb', line 10

def find_templates(name, prefix, partial, details)
  prefix = "dobro/#{resource.reference}" if prefix == 'dobro/application'
  super name, prefix, partial, details
end