Module: ViewInspect
- Defined in:
- lib/view_inspect/client_side_template.rb,
lib/view_inspect.rb,
lib/view_inspect/version.rb,
lib/view_inspect/handlers/eco.rb,
lib/view_inspect/handlers/ejs.rb,
lib/view_inspect/handlers/erb.rb,
lib/view_inspect/handlers/jst.rb,
lib/view_inspect/handlers/haml.rb,
lib/view_inspect/handlers/slim.rb,
lib/view_inspect/rails/railtie.rb,
lib/view_inspect/handlers/handlebars.rb,
lib/view_inspect/server_side_template.rb,
lib/view_inspect/handlers/html_template.rb
Overview
Were monkey patching subclasses of Tilt::Template to add file:line information to the original source
Defined Under Namespace
Modules: ClientSideTemplate, Handlers, Rails, ServerSideTemplate
Constant Summary
collapse
- VERSION =
"0.3.9"
Class Method Summary
collapse
Class Method Details
.allow_view_source_location? ⇒ Boolean
13
14
15
|
# File 'lib/view_inspect.rb', line 13
def self.allow_view_source_location?
!@disable && ::Rails.env.development?
end
|
.disable=(bool) ⇒ Object
17
18
19
|
# File 'lib/view_inspect.rb', line 17
def self.disable=(bool)
@disable = bool
end
|
.init ⇒ Object
6
7
8
9
10
11
|
# File 'lib/view_inspect.rb', line 6
def self.init
return unless allow_view_source_location?
ServerSideTemplate.handle
ClientSideTemplate.handle
end
|
.show_html_syntax_error=(bool) ⇒ Object
25
26
27
|
# File 'lib/view_inspect.rb', line 25
def self.show_html_syntax_error=(bool)
@show_html_syntax_error = bool
end
|
.show_html_syntax_error? ⇒ Boolean
21
22
23
|
# File 'lib/view_inspect.rb', line 21
def self.show_html_syntax_error?
@show_html_syntax_error
end
|