Class: Codewars::TrainNext
- Inherits:
-
Thor
- Object
- Thor
- Codewars::TrainNext
- Defined in:
- lib/codewars/train_next.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ TrainNext
constructor
A new instance of TrainNext.
Constructor Details
#initialize(client) ⇒ TrainNext
Returns a new instance of TrainNext.
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/codewars/train_next.rb', line 3 def initialize(client) language = Configuration.option('language') raise Thor::Error, 'You should set an default language to use this command' unless language kata = client.train_next_kata( language: language.split(',').first, peek: 'true', strategy: 'default' ) handle_next_kata(kata) end |