Class: Hookit::Resource::Logrotate

Inherits:
Base
  • Object
show all
Defined in:
lib/hookit/resource/logrotate.rb

Instance Attribute Summary

Attributes inherited from Base

#dict

Instance Method Summary collapse

Methods inherited from Base

#action, actions, #can_run?, default_action, #default_action, field, #not_if, #only_if

Constructor Details

#initialize(name) ⇒ Logrotate

Returns a new instance of Logrotate.



13
14
15
16
# File 'lib/hookit/resource/logrotate.rb', line 13

def initialize(name)
  path name unless path
  super
end

Instance Method Details

#run(action) ⇒ Object



18
19
20
21
22
23
# File 'lib/hookit/resource/logrotate.rb', line 18

def run(action)
  case action
  when :create
    create!
  end
end