class OneCmd::Command::Macosx::HidenFiles
Public Class Methods
new(argv)
click to toggle source
Calls superclass method
OneCmd::Command::new
# File lib/onecmd/command/macosx/hiden_files.rb, line 15 def initialize(argv) @hide = argv.flag?('hide', true) super end
options()
click to toggle source
Calls superclass method
OneCmd::Command::options
# File lib/onecmd/command/macosx/hiden_files.rb, line 11 def self.options [['--hide', 'hide system hiden files']].concat(super) end
Public Instance Methods
run()
click to toggle source
# File lib/onecmd/command/macosx/hiden_files.rb, line 20 def run if @hide system('defaults write com.apple.finder AppleShowAllFiles No && killall Finder') else system('defaults write com.apple.finder AppleShowAllFiles Yes && killall Finder') end end