Class: MongoClarify::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/mongo_clarify/output.rb

Instance Method Summary collapse

Constructor Details

#initialize(operation_method, exec_stats) ⇒ Output

Returns a new instance of Output.



5
6
7
8
# File 'lib/mongo_clarify/output.rb', line 5

def initialize(operation_method, exec_stats)
  @operation_method = operation_method
  @exec_stats = exec_stats
end

Instance Method Details

#markdown_tableObject



10
11
12
13
14
15
16
17
18
# File 'lib/mongo_clarify/output.rb', line 10

def markdown_table
  if @operation_method.nil? && @exec_stats.nil?
    return puts 'Could not parse this explain...'
  elsif @exec_stats.nil?
    return puts means_of_operation_only_table(@operation_method)
  end

  puts full_table
end