Class: AdLint::Benchmark::AnalysisTarget

Inherits:
Object
  • Object
show all
Defined in:
lib/adlint/benchmark/target.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ AnalysisTarget

Returns a new instance of AnalysisTarget.



53
54
55
# File 'lib/adlint/benchmark/target.rb', line 53

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



57
58
59
# File 'lib/adlint/benchmark/target.rb', line 57

def name
  @name
end

Class Method Details

.load(name) ⇒ Object



41
42
43
44
45
46
# File 'lib/adlint/benchmark/target.rb', line 41

def self.load(name)
  require(name_to_rb_fname(name))
  eval "#{name_to_rb_cname(name)}.new('#{name}')"
rescue LoadError
  nil
end

Instance Method Details

#analyzeObject



59
60
61
62
63
# File 'lib/adlint/benchmark/target.rb', line 59

def analyze
  patch_libraries do
    _analyze
  end
end