Class: Pigi::IDFileManager
- Inherits:
-
Object
- Object
- Pigi::IDFileManager
- Defined in:
- lib/pigi.rb
Constant Summary collapse
- @@filePath =
Gem.loaded_specs['pigi'].full_gem_path + "/pivotal_tracker_story_id"
Class Method Summary collapse
Class Method Details
.readID ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/pigi.rb', line 13 def self.readID if File::exists?(@@filePath) arr = IO.readlines(@@filePath) arr[0] else "ID wasn't set. Set your ID once again using s command." end end |
.saveIDToFile(id) ⇒ Object
9 10 11 |
# File 'lib/pigi.rb', line 9 def self.saveIDToFile(id) File.write(@@filePath, "#{id}") end |