Module: AdLint::Postfilter::PathUtil

Included in:
CmaConfig, SmaConfig
Defined in:
lib/adlint/postfilter/path.rb

Class Method Summary collapse

Class Method Details

.cma_msg_fpath_of(project_name, output_dpath = nil) ⇒ Object



57
58
59
60
61
62
63
# File 'lib/adlint/postfilter/path.rb', line 57

def cma_msg_fpath_of(project_name, output_dpath = nil)
  if output_dpath
    output_dpath.join(Pathname.new(project_name)).add_ext(".msg.csv")
  else
    Pathname.new(project_name).add_ext(".msg.csv")
  end
end

.i_fpath_of(src_fpath, strip_num, output_dpath = nil) ⇒ Object



39
40
41
42
43
44
45
# File 'lib/adlint/postfilter/path.rb', line 39

def i_fpath_of(src_fpath, strip_num, output_dpath = nil)
  if output_dpath
    output_dpath.join(src_fpath.strip(strip_num)).sub_ext(".i")
  else
    src_fpath.strip(strip_num).sub_ext(".i")
  end
end

.sma_msg_fpath_of(src_fpath, strip_num, output_dpath = nil) ⇒ Object



48
49
50
51
52
53
54
# File 'lib/adlint/postfilter/path.rb', line 48

def sma_msg_fpath_of(src_fpath, strip_num, output_dpath = nil)
  if output_dpath
    output_dpath.join(src_fpath.strip(strip_num)).add_ext(".msg.csv")
  else
    src_fpath.strip(strip_num).add_ext(".msg.csv")
  end
end