Module: GithubParser
- Defined in:
- lib/github_repo.rb
Instance Method Summary collapse
Instance Method Details
#parse_result(key) ⇒ Object
11 12 13 14 15 |
# File 'lib/github_repo.rb', line 11 def parse_result(key) result = self.body.gsub("\n", '') token = result[/#{Regexp.escape(key)}:(.*)/, 1] token.split("- ").reject{|e| e == ' ' || e.match('{}') }.collect{|e| e.strip} end |
#parse_single_result(key) ⇒ Object
7 8 9 |
# File 'lib/github_repo.rb', line 7 def parse_single_result(key) self.body[/#{Regexp.escape(key)}:\s(.*)/, 1] end |