2008-04-19 11:16:32 -04:00
|
|
|
module ActionView #:nodoc:
|
2008-07-03 14:06:00 -04:00
|
|
|
class InlineTemplate #:nodoc:
|
2008-07-05 13:05:50 -04:00
|
|
|
include Renderable
|
2008-07-03 14:06:00 -04:00
|
|
|
|
2008-04-19 11:16:32 -04:00
|
|
|
def initialize(view, source, locals = {}, type = nil)
|
|
|
|
@view = view
|
2008-06-15 22:22:27 -04:00
|
|
|
|
2008-04-19 11:16:32 -04:00
|
|
|
@source = source
|
|
|
|
@extension = type
|
|
|
|
@locals = locals || {}
|
2008-06-15 22:22:27 -04:00
|
|
|
|
2008-07-05 18:49:49 -04:00
|
|
|
@method_key = "inline_#{@source.hash.abs}"
|
2008-07-03 22:08:27 -04:00
|
|
|
@handler = Template.handler_class_for_extension(@extension).new(@view)
|
2008-04-19 11:16:32 -04:00
|
|
|
end
|
2008-07-05 17:27:43 -04:00
|
|
|
|
|
|
|
private
|
|
|
|
def method_name_path_segment
|
2008-07-05 18:49:49 -04:00
|
|
|
@method_key
|
2008-07-05 17:27:43 -04:00
|
|
|
end
|
2008-04-19 11:16:32 -04:00
|
|
|
end
|
|
|
|
end
|