Class: CaptainHook::DSL::HandlePostReceive

Inherits:
Object
  • Object
show all
Defined in:
lib/captain_hook/dsl/handle_post_receive.rb

Instance Method Summary collapse

Constructor Details

#initialize(post_receive_event) ⇒ HandlePostReceive

Returns a new instance of HandlePostReceive.



4
5
6
# File 'lib/captain_hook/dsl/handle_post_receive.rb', line 4

def initialize(post_receive_event)
  @post_receive_event = post_receive_event
end

Instance Method Details

#authorObject



17
18
19
# File 'lib/captain_hook/dsl/handle_post_receive.rb', line 17

def author
  @post_receive_event.author
end

#messageObject



8
9
10
11
# File 'lib/captain_hook/dsl/handle_post_receive.rb', line 8

def message
  puts "post-receive: #{@post_receive_event.message}"
  @post_receive_event.message
end

#ref_nameObject



13
14
15
# File 'lib/captain_hook/dsl/handle_post_receive.rb', line 13

def ref_name
  @post_receive_event.ref_name
end

#run(&block) ⇒ Object



21
22
23
# File 'lib/captain_hook/dsl/handle_post_receive.rb', line 21

def run &block
  instance_eval &block
end