Class: 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.



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

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

Instance Method Details

#baseObject



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

def base
  base_head.first
end

#headObject



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

def head
  base_head.last
end