Class: AtCoderVcFriends::PathInfo

Inherits:
AtCoderFriends::PathInfo
  • Object
show all
Defined in:
lib/at_coder_vc_friends/path_info.rb

Overview

holds target path information

Instance Method Summary collapse

Instance Method Details

#componentsObject



13
14
15
16
17
18
# File 'lib/at_coder_vc_friends/path_info.rb', line 13

def components
  @dir, prg = File.split(path)
  base, ext = prg.split('.')
  q = base.gsub(/_[^#_]+\z/, '')
  [path, dir, prg, base, ext, q]
end

#contest_nameObject



8
9
10
11
# File 'lib/at_coder_vc_friends/path_info.rb', line 8

def contest_name
  q = components[-1]
  q.split('#')[0]
end