Class: SolvePb::FileGenerator
- Inherits:
-
Object
- Object
- SolvePb::FileGenerator
- Defined in:
- lib/solve_pb/file_generator.rb
Instance Attribute Summary collapse
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#problem ⇒ Object
readonly
Returns the value of attribute problem.
Instance Method Summary collapse
Instance Attribute Details
#language ⇒ Object (readonly)
Returns the value of attribute language.
7 8 9 |
# File 'lib/solve_pb/file_generator.rb', line 7 def language @language end |
#problem ⇒ Object (readonly)
Returns the value of attribute problem.
7 8 9 |
# File 'lib/solve_pb/file_generator.rb', line 7 def problem @problem end |
Instance Method Details
#generate(args) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/solve_pb/file_generator.rb', line 9 def generate(args) @problem = ProblemParser.new.parse(args[:url]) @language = args[:lang] if problem puts "Preparing workspace" create_directory create_readme create_main_program create_sample_input create_sample_output download_pb_statement # create_runsh(problem, language) else puts "Couldn't fetch problem information. Please raise an issue on https://github.com/nctruong/solve_pb" end end |