Class: Jpmobile::Resolver

Inherits:
ActionView::FileSystemResolver
  • Object
show all
Defined in:
lib/jpmobile/resolver.rb

Constant Summary collapse

EXTENSIONS =
[:locale, :formats, :handlers, :mobile]
DEFAULT_PATTERN =
":prefix/:action{_:mobile,}{.:locale,}{.:formats,}{.:handlers,}"

Instance Method Summary collapse

Constructor Details

#initialize(path, pattern = nil) ⇒ Resolver

Returns a new instance of Resolver

Raises:

  • (ArgumentError)

6
7
8
9
10
# File 'lib/jpmobile/resolver.rb', line 6

def initialize(path, pattern=nil)
  raise ArgumentError, "path already is a Resolver class" if path.is_a?(Resolver)
  super(path, pattern || DEFAULT_PATTERN)
  @path = File.expand_path(path)
end