class AdLint::Ld::VariableMapper
Attributes
map[R]
Public Class Methods
new()
click to toggle source
# File lib/adlint/ld/object.rb, line 144 def initialize @map = VariableMap.new end
Public Instance Methods
execute(met_fpath)
click to toggle source
# File lib/adlint/ld/object.rb, line 150 def execute(met_fpath) sma_wd = Pathname.pwd CSV.foreach(met_fpath) do |csv_row| if rec = MetricRecord.of(csv_row, sma_wd) case when rec.version? sma_wd = Pathname.new(rec.exec_working_directory) when rec.variable_definition? if rec.variable_linkage_type == "X" @map.add_variable(Variable.new(rec)) end when rec.global_variable_declaration? @map.add_variable_declaration(VariableDeclaration.new(rec)) end end end end