Class: Puppetfactory::Plugins::Hooks

Inherits:
Puppetfactory::Plugins show all
Defined in:
lib/puppetfactory/plugins/hooks.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Hooks

Returns a new instance of Hooks.



7
8
9
10
11
12
# File 'lib/puppetfactory/plugins/hooks.rb', line 7

def initialize(options)
  super(options)

  @weight = 1
  @path   = options[:hooks_path] || '/etc/puppetfactory/hooks'
end

Instance Attribute Details

#weightObject (readonly)

Returns the value of attribute weight.



5
6
7
# File 'lib/puppetfactory/plugins/hooks.rb', line 5

def weight
  @weight
end

Instance Method Details

#create(username) ⇒ Object



14
15
16
# File 'lib/puppetfactory/plugins/hooks.rb', line 14

def create(username)
  call_hooks(:create, username)
end

#delete(username) ⇒ Object



18
19
20
# File 'lib/puppetfactory/plugins/hooks.rb', line 18

def delete(username)
  call_hooks(:delete, username)
end