diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-04-25 14:45:56 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-04-25 14:45:56 -0400 |
commit | 92c681a53c5565eddae51dc0bede07541c3eb0c5 (patch) | |
tree | a2de3d60882ec3aea13c6e9cccf0ee3b9d94ffa8 /app/models/commit_range.rb | |
parent | 2207e5a6c9cacdc97878f23015a2257b39af9d48 (diff) | |
download | gitlab-ce-92c681a53c5565eddae51dc0bede07541c3eb0c5.tar.gz |
Remove CommitRange#to_a
Diffstat (limited to 'app/models/commit_range.rb')
-rw-r--r-- | app/models/commit_range.rb | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/app/models/commit_range.rb b/app/models/commit_range.rb index dce1bfcc198..1b4b12e70e9 100644 --- a/app/models/commit_range.rb +++ b/app/models/commit_range.rb @@ -15,7 +15,6 @@ # # Assuming `project` is a Project with a repository containing both commits: # range.project = project # range.valid_commits? # => true -# range.to_a # => [#<Commit ...>, #<Commit ...>] # class CommitRange include ActiveModel::Conversion @@ -55,18 +54,6 @@ class CommitRange %(#<#{self.class}:#{object_id} #{to_s}>) end - # Returns an Array of Commit objects, where the first value is the starting - # commit, and the second value is the ending commit - # - # Returns `[nil, nil]` if `valid_commits?` is falsey - def to_a - if valid_commits? - [commit_from, commit_to] - else - [nil, nil] - end - end - def to_s "#{sha_from[0..7]}#{notation}#{sha_to[0..7]}" end |