Class: AtCoderFriends::Context
- Inherits:
-
Object
- Object
- AtCoderFriends::Context
- Defined in:
- lib/at_coder_friends/context.rb
Overview
Holds applicaion global information
-
command line options
-
target path
-
configuration
-
application modules
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#path_info ⇒ Object
readonly
Returns the value of attribute path_info.
Instance Method Summary collapse
- #config ⇒ Object
- #emitter ⇒ Object
- #generator ⇒ Object
-
#initialize(options, path) ⇒ Context
constructor
A new instance of Context.
- #judge_test_runner ⇒ Object
- #path ⇒ Object
- #post_process ⇒ Object
- #sample_test_runner ⇒ Object
- #scraping_agent ⇒ Object
- #verifier ⇒ Object
Constructor Details
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
10 11 12 |
# File 'lib/at_coder_friends/context.rb', line 10 def @options end |
#path_info ⇒ Object (readonly)
Returns the value of attribute path_info.
10 11 12 |
# File 'lib/at_coder_friends/context.rb', line 10 def path_info @path_info end |
Instance Method Details
#config ⇒ Object
21 22 23 |
# File 'lib/at_coder_friends/context.rb', line 21 def config @config ||= ConfigLoader.load_config(self) end |
#emitter ⇒ Object
33 34 35 |
# File 'lib/at_coder_friends/context.rb', line 33 def emitter @emitter ||= Emitter.new(self) end |
#generator ⇒ Object
29 30 31 |
# File 'lib/at_coder_friends/context.rb', line 29 def generator @generator ||= Generator::Main.new(self) end |
#judge_test_runner ⇒ Object
41 42 43 |
# File 'lib/at_coder_friends/context.rb', line 41 def judge_test_runner @judge_test_runner ||= TestRunner::Judge.new(self) end |
#path ⇒ Object
17 18 19 |
# File 'lib/at_coder_friends/context.rb', line 17 def path path_info.path end |
#post_process ⇒ Object
49 50 51 |
# File 'lib/at_coder_friends/context.rb', line 49 def post_process @scraping_agent&.save_session end |
#sample_test_runner ⇒ Object
37 38 39 |
# File 'lib/at_coder_friends/context.rb', line 37 def sample_test_runner @sample_test_runner ||= TestRunner::Sample.new(self) end |