Class: Bootsetting::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/bootsetting.rb

Overview

Your code goes here…

Instance Method Summary collapse

Instance Method Details

#copy(from_dir, to_dir) ⇒ Object



35
36
37
38
39
# File 'lib/bootsetting.rb', line 35

def copy(from_dir, to_dir)
    puts "form: #{from_dir} to: #{to_dir}".bright.red
    helper = CopyHelper.new()  
    helper.copy(from_dir, to_dir)
end

#dfc(type, suffix) ⇒ Object



19
20
21
22
23
24
25
26
# File 'lib/bootsetting.rb', line 19

def dfc(type, suffix)
    super_dir = File.expand_path('../', __FILE__)
    puts(super_dir)
    puts "start to check ...".bright.red
    puts "parames type: #{type} suffix: #{suffix}".blue
    helper = FileCheckHelper.new()
    helper.check(type, suffix)
end

#hello(name, from = nil) ⇒ Object



13
14
15
16
# File 'lib/bootsetting.rb', line 13

def hello(name, from=nil)
  puts "from: #{from}" if from
  puts "Hello method #{name}".bright.red
end

#kswitchObject



29
30
31
32
# File 'lib/bootsetting.rb', line 29

def kswitch()
`hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x7000000E0},{"HIDKeyboardModifierMappingSrc":0x7000000E0,"HIDKeyboardModifierMappingDst":0x700000039}]}'`
puts "say hello to new keyMapping".bright.green
end