Module: Learn
- Defined in:
- lib/learn.rb,
lib/learn/cli.rb,
lib/learn/student.rb,
lib/learn/version.rb,
lib/learn/exercise.rb
Defined Under Namespace
Classes: CLI, Exercise, Student
Constant Summary
collapse
- HOST =
"http://aprenderuby.herokuapp.com"
- SETTINGS_PATH =
"#{Dir.home}/.learn"
- VERSION =
"0.0.1"
Class Method Summary
collapse
Class Method Details
.read_settings ⇒ Object
17
18
19
|
# File 'lib/learn.rb', line 17
def self.read_settings
settings = JSON.parse File.read(Learn::SETTINGS_PATH)
end
|
.write_settings(settings_hash) ⇒ Object
10
11
12
13
14
15
|
# File 'lib/learn.rb', line 10
def self.write_settings(settings_hash)
File.open(Learn::SETTINGS_PATH, 'w') do |f|
f.write(settings_hash)
end
settings_hash
end
|