Top Level Namespace

Defined Under Namespace

Modules: TM Classes: Lock

Instance Method Summary collapse

Instance Method Details

#numConv(str) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/nysol/chunk.rb', line 39

def numConv(str)
  a=str.gsub(/#{$pct}/,"XX%")
  a.gsub!(/#{$year}/,"XX年")
  a.gsub!(/#{$syear}/,"XX周年")
  a.gsub!(/#{$stock}/,"XX株")
  $currency.each{|cur|
    a.gsub!(/#{$cur_pfx}#{$pct_num}([—〜]#{$pct_num})?#{cur}#{$cur_sfx}/,"XX#{cur}")
  }
  a.gsub!(/円#{$pct_num}銭/,"円")
  a.gsub!("XX円XX円","XX円")
  return a
end