class AtCoderFriends::Context

Holds applicaion global information

Attributes

options[R]
path_info[R]

Public Class Methods

new(options, path) click to toggle source
# File lib/at_coder_friends/context.rb, line 12
def initialize(options, path)
  @options = options
  @path_info = PathInfo.new(File.expand_path(path))
end

Public Instance Methods

config() click to toggle source
# File lib/at_coder_friends/context.rb, line 21
def config
  @config ||= ConfigLoader.load_config(self)
end
emitter() click to toggle source
# File lib/at_coder_friends/context.rb, line 33
def emitter
  @emitter ||= Emitter.new(self)
end
generator() click to toggle source
# File lib/at_coder_friends/context.rb, line 29
def generator
  @generator ||= Generator::Main.new(self)
end
judge_test_runner() click to toggle source
# File lib/at_coder_friends/context.rb, line 41
def judge_test_runner
  @judge_test_runner ||= TestRunner::Judge.new(self)
end
path() click to toggle source
# File lib/at_coder_friends/context.rb, line 17
def path
  path_info.path
end
post_process() click to toggle source
# File lib/at_coder_friends/context.rb, line 49
def post_process
  @scraping_agent&.save_session
end
sample_test_runner() click to toggle source
# File lib/at_coder_friends/context.rb, line 37
def sample_test_runner
  @sample_test_runner ||= TestRunner::Sample.new(self)
end
scraping_agent() click to toggle source
# File lib/at_coder_friends/context.rb, line 25
def scraping_agent
  @scraping_agent ||= Scraping::Agent.new(self)
end
verifier() click to toggle source
# File lib/at_coder_friends/context.rb, line 45
def verifier
  @verifier ||= Verifier.new(self)
end