Class: Exercism
- Inherits:
-
Object
show all
- Defined in:
- lib/cli.rb,
lib/exercism.rb,
lib/exercism/api.rb,
lib/exercism/env.rb,
lib/exercism/config.rb,
lib/exercism/version.rb,
lib/exercism/assignment.rb,
lib/exercism/submission.rb,
lib/cli/monitored_request.rb
Defined Under Namespace
Classes: Api, Assignment, CLI, Config, Env, Submission
Constant Summary
collapse
- VERSION =
"0.0.26"
Class Method Summary
collapse
Class Method Details
.alternate_config_path ⇒ Object
46
47
48
|
# File 'lib/exercism.rb', line 46
def self.alternate_config_path
Config.alternate_path
end
|
.config ⇒ Object
50
51
52
|
# File 'lib/exercism.rb', line 50
def self.config
Config.read(home)
end
|
.home ⇒ Object
24
25
26
|
# File 'lib/exercism.rb', line 24
def self.home
@home ||= Env.home
end
|
.login(github_username, key, dir) ⇒ Object
28
29
30
31
32
33
34
35
|
# File 'lib/exercism.rb', line 28
def self.login(github_username, key, dir)
data = {
'github_username' => github_username,
'key' => key,
'project_dir' => dir
}
Config.write home, data
end
|
.project_dir ⇒ Object
42
43
44
|
# File 'lib/exercism.rb', line 42
def self.project_dir
config.project_dir
end
|
.user ⇒ Object
37
38
39
40
|
# File 'lib/exercism.rb', line 37
def self.user
c = config
User.new(c.github_username, c.key)
end
|