Class: Exercism::Adapters::Ruby

Inherits:
Adapter
  • Object
show all
Defined in:
lib/exercism-analysis/adapters/ruby.rb

Instance Attribute Summary

Attributes inherited from Adapter

#code

Instance Method Summary collapse

Methods inherited from Adapter

#initialize

Constructor Details

This class inherits a constructor from Exercism::Adapters::Adapter

Instance Method Details

#astObject



6
7
8
# File 'lib/exercism-analysis/adapters/ruby.rb', line 6

def ast
  @ast ||= CodeMiner.parse(code)
end

#process(analyzer_classes) ⇒ Object



10
11
12
13
14
# File 'lib/exercism-analysis/adapters/ruby.rb', line 10

def process(analyzer_classes)
  super(analyzer_classes).tap do |analyzers|
    CodeMiner.process(code, analyzers.map(&:processor).compact)
  end
end