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.



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

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

Instance Method Details

#baseObject



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

def base
  base_head.first
end

#headObject



13
14
15
# File 'lib/danger/ci_source/support/commits.rb', line 13

def head
  base_head.last
end