Class: Karabiner
- Inherits:
-
Object
- Object
- Karabiner
- Defined in:
- lib/karabiner/namespace.rb,
lib/karabiner.rb,
lib/karabiner/version.rb
Overview
Files which require this file can avoid deep nesting for class declaration
Defined Under Namespace
Modules: CLI, DSL, History, XmlTree Classes: Appdef, Config, Group, Item, Key, Property, Remap, Root, Vkopenurldef
Constant Summary collapse
- XML_FILE_NAME =
"private.xml"
- XML_DIR =
File.("~/Library/Application Support/Karabiner")
- VERSION =
"0.2.1"
Instance Attribute Summary collapse
-
#config_path ⇒ Object
readonly
Returns the value of attribute config_path.
Instance Method Summary collapse
- #apply_configuration ⇒ Object
-
#initialize(config_path) ⇒ Karabiner
constructor
A new instance of Karabiner.
Constructor Details
#initialize(config_path) ⇒ Karabiner
Returns a new instance of Karabiner.
11 12 13 14 |
# File 'lib/karabiner.rb', line 11 def initialize(config_path) @config_path = config_path Karabiner::History.clear_histroy end |
Instance Attribute Details
#config_path ⇒ Object (readonly)
Returns the value of attribute config_path.
15 16 17 |
# File 'lib/karabiner.rb', line 15 def config_path @config_path end |
Instance Method Details
#apply_configuration ⇒ Object
17 18 19 20 21 22 |
# File 'lib/karabiner.rb', line 17 def apply_configuration replace_private_xml CLI.reload_xml puts "Successfully updated Karabiner configuration" end |