Class: ExplainResult
- Inherits:
-
Object
- Object
- ExplainResult
- Defined in:
- lib/rbhive/explain_result.rb
Instance Method Summary collapse
- #ast ⇒ Object
-
#initialize(rows) ⇒ ExplainResult
constructor
A new instance of ExplainResult.
- #raw ⇒ Object
- #stage_count ⇒ Object
- #stage_dependencies ⇒ Object
- #to_s ⇒ Object
- #to_tsv ⇒ Object
Constructor Details
#initialize(rows) ⇒ ExplainResult
Returns a new instance of ExplainResult.
2 3 4 |
# File 'lib/rbhive/explain_result.rb', line 2 def initialize(rows) @rows = rows end |
Instance Method Details
#ast ⇒ Object
6 7 8 |
# File 'lib/rbhive/explain_result.rb', line 6 def ast by_section[:abstract_syntax_tree].first end |
#raw ⇒ Object
22 23 24 |
# File 'lib/rbhive/explain_result.rb', line 22 def raw @rows end |
#stage_count ⇒ Object
10 11 12 |
# File 'lib/rbhive/explain_result.rb', line 10 def stage_count stage_dependencies.length end |
#stage_dependencies ⇒ Object
14 15 16 |
# File 'lib/rbhive/explain_result.rb', line 14 def stage_dependencies by_section[:stage_dependencies] || [] end |
#to_s ⇒ Object
26 27 28 |
# File 'lib/rbhive/explain_result.rb', line 26 def to_s to_tsv end |
#to_tsv ⇒ Object
18 19 20 |
# File 'lib/rbhive/explain_result.rb', line 18 def to_tsv @rows.join("\n") end |