Class: GradesFirst::Config
- Inherits:
-
Object
- Object
- GradesFirst::Config
- Defined in:
- lib/gradesfirst/config.rb
Class Method Summary collapse
Instance Method Summary collapse
- #code_talkers ⇒ Object
- #day_zero ⇒ Object
- #developers ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
5 6 7 |
# File 'lib/gradesfirst/config.rb', line 5 def initialize Dotenv.load(*GradesFirst::Config.load_paths) end |
Class Method Details
.load_paths ⇒ Object
9 10 11 |
# File 'lib/gradesfirst/config.rb', line 9 def self.load_paths @@load_paths ||= [".env", "~/.env", ".env.master"] end |
.load_paths=(paths) ⇒ Object
13 14 15 |
# File 'lib/gradesfirst/config.rb', line 13 def self.load_paths=(paths) @@load_paths = paths end |
Instance Method Details
#code_talkers ⇒ Object
17 18 19 |
# File 'lib/gradesfirst/config.rb', line 17 def code_talkers ENV["GF_CODE_TALKERS"].to_s.split("|") end |
#day_zero ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/gradesfirst/config.rb', line 21 def day_zero if ENV["GF_DAY_ZERO"].nil? Time.now else Time.parse(ENV["GF_DAY_ZERO"]) end end |
#developers ⇒ Object
29 30 31 |
# File 'lib/gradesfirst/config.rb', line 29 def developers ENV["GF_DEVELOPERS"].to_s.split("|") end |