Class: Hitch::Author

Inherits:
Object
  • Object
show all
Defined in:
lib/hitch/author.rb

Class Method Summary collapse

Class Method Details

.add(author_github, author_email) ⇒ Object



4
5
6
7
8
# File 'lib/hitch/author.rb', line 4

def self.add(author_github, author_email)
  unless find(author_github)
    available_pairs[author_github] = author_email
  end
end

.find(author_github) ⇒ Object



10
11
12
# File 'lib/hitch/author.rb', line 10

def self.find(author_github)
  available_pairs[author_github]
end

.write_fileObject



14
15
16
17
18
# File 'lib/hitch/author.rb', line 14

def self.write_file
  File.open(hitch_pairs, File::CREAT|File::TRUNC|File::RDWR, 0644) do |out|
    YAML.dump(available_pairs, out)
  end
end