class method
self.parse
Ruby on Rails 7.2.3
Since v7.0.10Signature
self.parse(virtual)
Build a TemplatePath form a virtual path
Parameters
-
virtualreq
Source
# File actionview/lib/action_view/template_path.rb, line 28
def self.parse(virtual)
if nameidx = virtual.rindex("/")
prefix = virtual[0, nameidx]
name = virtual.from(nameidx + 1)
prefix = prefix[1..] if prefix.start_with?("/")
else
prefix = ""
name = virtual
end
partial = name.start_with?("_")
name = name[1..] if partial
new name, prefix, partial, virtual
end
Defined in actionview/lib/action_view/template_path.rb line 28
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::TemplatePath