Class: Exercism
- Inherits:
-
Object
show all
- Defined in:
- lib/cli.rb,
lib/exercism.rb,
lib/exercism/api.rb,
lib/exercism/env.rb,
lib/exercism/stash.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, Stash, Submission
Constant Summary
collapse
- VERSION =
"0.0.28"
Class Method Summary
collapse
Class Method Details
.alternate_config_path ⇒ Object
.config ⇒ Object
51
52
53
|
# File 'lib/exercism.rb', line 51
def self.config
Config.read(home)
end
|
.home ⇒ Object
25
26
27
|
# File 'lib/exercism.rb', line 25
def self.home
@home ||= Env.home
end
|
.login(github_username, key, dir) ⇒ Object
29
30
31
32
33
34
35
36
|
# File 'lib/exercism.rb', line 29
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
43
44
45
|
# File 'lib/exercism.rb', line 43
def self.project_dir
config.project_dir
end
|
.user ⇒ Object
38
39
40
41
|
# File 'lib/exercism.rb', line 38
def self.user
c = config
User.new(c.github_username, c.key)
end
|