Class: GitPusshuTen::Hook

Inherits:
Object
  • Object
show all
Defined in:
lib/gitpusshuten/hook.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Hook

Initializes a new hook Takes a hash of parameters



19
20
21
22
23
# File 'lib/gitpusshuten/hook.rb', line 19

def initialize(options)
  @name     = options[:name]
  @type     = options[:type]
  @commands = options[:commands]
end

Instance Attribute Details

#commandsObject

Stores the (parsed) commands that need to be run



14
15
16
# File 'lib/gitpusshuten/hook.rb', line 14

def commands
  @commands
end

#nameObject

Stores the name of the performed hook



6
7
8
# File 'lib/gitpusshuten/hook.rb', line 6

def name
  @name
end

#typeObject

Stores the type of hook (pre or post)



10
11
12
# File 'lib/gitpusshuten/hook.rb', line 10

def type
  @type
end