diff options
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index 0164ae663be..ea5b451b28f 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -10,12 +10,20 @@ class Commit attr_accessor :raw + def self.decorate(commits) + commits.map { |c| Commit.new(c) } + end + def initialize(raw_commit) raise "Nil as raw commit passed" unless raw_commit @raw = raw_commit end + def id + @raw.id + end + def method_missing(m, *args, &block) @raw.send(m, *args, &block) end |