Class: PairUp::Participant
- Inherits:
-
Object
- Object
- PairUp::Participant
- Defined in:
- lib/pair-up/participant.rb
Class Method Summary collapse
Class Method Details
.add(github, email, name) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/pair-up/participant.rb', line 4 def self.add(github, email, name) unless find(github) available_pairs[github] = {} available_pairs[github]["email"] = email available_pairs[github]["name"] = name end end |
.find(github) ⇒ Object
12 13 14 |
# File 'lib/pair-up/participant.rb', line 12 def self.find(github) available_pairs[github] end |
.write_file ⇒ Object
16 17 18 19 20 |
# File 'lib/pair-up/participant.rb', line 16 def self.write_file File.open(pairs_file, File::CREAT|File::TRUNC|File::RDWR, 0644) do |out| YAML.dump(available_pairs, out) end end |