Class: Schmersion::Commit

Inherits:
Object
  • Object
show all
Defined in:
lib/schmersion/commit.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(commit) ⇒ Commit

Returns a new instance of Commit.



14
15
16
17
18
19
20
# File 'lib/schmersion/commit.rb', line 14

def initialize(commit)
  @message = Message.new(commit.message)
  @ref = commit.sha
  @date = commit.date
  @author = commit.author.name
  @raw_commit = commit
end

Instance Attribute Details

#authorObject (readonly)

Returns the value of attribute author.



11
12
13
# File 'lib/schmersion/commit.rb', line 11

def author
  @author
end

#dateObject (readonly)

Returns the value of attribute date.



10
11
12
# File 'lib/schmersion/commit.rb', line 10

def date
  @date
end

#messageObject (readonly)

Returns the value of attribute message.



8
9
10
# File 'lib/schmersion/commit.rb', line 8

def message
  @message
end

#raw_commitObject (readonly)

Returns the value of attribute raw_commit.



12
13
14
# File 'lib/schmersion/commit.rb', line 12

def raw_commit
  @raw_commit
end

#refObject (readonly)

Returns the value of attribute ref.



9
10
11
# File 'lib/schmersion/commit.rb', line 9

def ref
  @ref
end