Class: LogMagic::MySqlExplainer::QueryExplainerSection
- Inherits:
-
Object
- Object
- LogMagic::MySqlExplainer::QueryExplainerSection
show all
- Includes:
- TemplatingUtils
- Defined in:
- lib/log_magic/explainers/mysql/query_explainer.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
#enriche, #match_regex, #rendered_template, #template_dir, #template_path
Constructor Details
Returns a new instance of QueryExplainerSection.
5
6
7
|
# File 'lib/log_magic/explainers/mysql/query_explainer.rb', line 5
def initialize(mysql_query)
@mysql_query = mysql_query
end
|
Instance Attribute Details
#mysql_query ⇒ Object
Returns the value of attribute mysql_query.
3
4
5
|
# File 'lib/log_magic/explainers/mysql/query_explainer.rb', line 3
def mysql_query
@mysql_query
end
|
Instance Method Details
#enriche_mysql_query ⇒ Object
26
27
28
29
30
31
32
|
# File 'lib/log_magic/explainers/mysql/query_explainer.rb', line 26
def enriche_mysql_query
explainer_section_classes.map do |explainer_section_class|
explainer_section_class.new(mysql_query)
end.each do |explainer_section|
explainer_section.enriche
end
end
|
#explainer_section_classes ⇒ Object
#explanation ⇒ Object
9
10
11
|
# File 'lib/log_magic/explainers/mysql/query_explainer.rb', line 9
def explanation
rendered_template
end
|
#template_name ⇒ Object
13
14
15
|
# File 'lib/log_magic/explainers/mysql/query_explainer.rb', line 13
def template_name
'query.haml'
end
|