Class: ActionView::RenderParser::Base
Do not use. This class is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Inherits: | Object |
Defined in: | actionview/lib/action_view/render_parser.rb |
Class Method Summary
- .new(name, code) ⇒ Base constructor
Instance Method Summary
- #directory private
- #partial_to_virtual_path(render_type, partial_path) private
Constructor Details
.new(name, code) ⇒ Base
# File 'actionview/lib/action_view/render_parser.rb', line 9
def initialize(name, code) @name = name @code = code end
Instance Method Details
#directory (private)
[ GitHub ]# File 'actionview/lib/action_view/render_parser.rb', line 15
def directory File.dirname(@name) end
#partial_to_virtual_path(render_type, partial_path) (private)
[ GitHub ]# File 'actionview/lib/action_view/render_parser.rb', line 19
def partial_to_virtual_path(render_type, partial_path) if render_type == :partial || render_type == :layout partial_path.gsub(%r{(/|^)([^/]*)\z}, '\1_\2') else partial_path end end