Class: Danger::Commits

Inherits:
Object
  • Object
show all
Defined in:
lib/danger/ci_source/support/commits.rb

Instance Method Summary collapse

Constructor Details

#initialize(base_head) ⇒ Commits

Returns a new instance of Commits.



3
4
5
# File 'lib/danger/ci_source/support/commits.rb', line 3

def initialize(base_head)
  @base_head = base_head.strip.split(" ".freeze)
end

Instance Method Details

#baseObject



7
8
9
# File 'lib/danger/ci_source/support/commits.rb', line 7

def base
  base_head.first
end

#headObject



11
12
13
# File 'lib/danger/ci_source/support/commits.rb', line 11

def head
  base_head.last
end