Class: MetzScan::Analyzers::RepeatedQueryCriteria::QuerySiteCollector::QuerySite
- Inherits:
-
Struct
- Object
- Struct
- MetzScan::Analyzers::RepeatedQueryCriteria::QuerySiteCollector::QuerySite
- Defined in:
- lib/metz_scan/analyzers/repeated_query_criteria.rb
Instance Attribute Summary collapse
-
#criteria_keys ⇒ Object
Returns the value of attribute criteria_keys.
-
#enclosing_name ⇒ Object
Returns the value of attribute enclosing_name.
-
#expression ⇒ Object
Returns the value of attribute expression.
-
#line ⇒ Object
Returns the value of attribute line.
-
#method_name ⇒ Object
Returns the value of attribute method_name.
-
#path ⇒ Object
Returns the value of attribute path.
-
#query_method ⇒ Object
Returns the value of attribute query_method.
-
#query_operation ⇒ Object
Returns the value of attribute query_operation.
-
#receiver ⇒ Object
Returns the value of attribute receiver.
Instance Method Summary collapse
Instance Attribute Details
#criteria_keys ⇒ Object
Returns the value of attribute criteria_keys
153 154 155 |
# File 'lib/metz_scan/analyzers/repeated_query_criteria.rb', line 153 def criteria_keys @criteria_keys end |
#enclosing_name ⇒ Object
Returns the value of attribute enclosing_name
153 154 155 |
# File 'lib/metz_scan/analyzers/repeated_query_criteria.rb', line 153 def enclosing_name @enclosing_name end |
#expression ⇒ Object
Returns the value of attribute expression
153 154 155 |
# File 'lib/metz_scan/analyzers/repeated_query_criteria.rb', line 153 def expression @expression end |
#line ⇒ Object
Returns the value of attribute line
153 154 155 |
# File 'lib/metz_scan/analyzers/repeated_query_criteria.rb', line 153 def line @line end |
#method_name ⇒ Object
Returns the value of attribute method_name
153 154 155 |
# File 'lib/metz_scan/analyzers/repeated_query_criteria.rb', line 153 def method_name @method_name end |
#path ⇒ Object
Returns the value of attribute path
153 154 155 |
# File 'lib/metz_scan/analyzers/repeated_query_criteria.rb', line 153 def path @path end |
#query_method ⇒ Object
Returns the value of attribute query_method
153 154 155 |
# File 'lib/metz_scan/analyzers/repeated_query_criteria.rb', line 153 def query_method @query_method end |
#query_operation ⇒ Object
Returns the value of attribute query_operation
153 154 155 |
# File 'lib/metz_scan/analyzers/repeated_query_criteria.rb', line 153 def query_operation @query_operation end |
#receiver ⇒ Object
Returns the value of attribute receiver
153 154 155 |
# File 'lib/metz_scan/analyzers/repeated_query_criteria.rb', line 153 def receiver @receiver end |
Instance Method Details
#context ⇒ Object
167 168 169 170 171 |
# File 'lib/metz_scan/analyzers/repeated_query_criteria.rb', line 167 def context return "#{enclosing_name}#{method_name}" if enclosing_name && method_name method_name || enclosing_name end |
#fingerprint ⇒ Object
163 164 165 |
# File 'lib/metz_scan/analyzers/repeated_query_criteria.rb', line 163 def fingerprint [receiver, query_method, criteria_keys].join(":") end |
#query ⇒ Object
155 156 157 |
# File 'lib/metz_scan/analyzers/repeated_query_criteria.rb', line 155 def query "#{receiver}.#{query_method}(#{criteria_keys.join(', ')})" end |
#receiver_shape ⇒ Object
159 160 161 |
# File 'lib/metz_scan/analyzers/repeated_query_criteria.rb', line 159 def receiver_shape receiver.include?(".") ? "scope_chain" : "constant" end |