mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
21 lines
460 B
Ruby
21 lines
460 B
Ruby
module ActionView #:nodoc:
|
|
class InlineTemplate #:nodoc:
|
|
include Renderable
|
|
|
|
def initialize(view, source, locals = {}, type = nil)
|
|
@view = view
|
|
|
|
@source = source
|
|
@extension = type
|
|
@locals = locals || {}
|
|
|
|
@method_key = "inline_#{@source.hash.abs}"
|
|
@handler = Template.handler_class_for_extension(@extension).new(@view)
|
|
end
|
|
|
|
private
|
|
def method_name_path_segment
|
|
@method_key
|
|
end
|
|
end
|
|
end
|