Class: Puppetfactory::Plugins::Hooks
- Inherits:
-
Puppetfactory::Plugins
- Object
- Puppetfactory::Plugins
- Puppetfactory::Plugins::Hooks
- Defined in:
- lib/puppetfactory/plugins/hooks.rb
Instance Attribute Summary collapse
-
#weight ⇒ Object
readonly
Returns the value of attribute weight.
Instance Method Summary collapse
- #create(username) ⇒ Object
- #delete(username) ⇒ Object
-
#initialize(options) ⇒ Hooks
constructor
A new instance of Hooks.
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() super() @weight = 1 @path = [:hooks_path] || '/etc/puppetfactory/hooks' end |
Instance Attribute Details
#weight ⇒ Object (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 |