Class: Hookit::Resource::Mount
- Defined in:
- lib/hookit/resource/mount.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(name) ⇒ Mount
constructor
A new instance of Mount.
- #run(action) ⇒ Object
Methods inherited from Base
#action, actions, #can_run?, default_action, #default_action, field, #not_if, #only_if
Constructor Details
#initialize(name) ⇒ Mount
Returns a new instance of Mount.
17 18 19 20 21 |
# File 'lib/hookit/resource/mount.rb', line 17 def initialize(name) mount_point(name) unless mount_point pass('-') unless pass super end |
Instance Method Details
#run(action) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/hookit/resource/mount.rb', line 23 def run(action) case action when :mount mount! when :umount umount! when :remount umount! mount! when :enable disable! enable! when :disable disable! end end |