Class: TouchscreenTaps::Config
- Inherits:
-
Object
- Object
- TouchscreenTaps::Config
- Defined in:
- lib/touchscreen_taps/config.rb
Overview
Holds main configurations
Instance Attribute Summary collapse
-
#buffer ⇒ Object
readonly
Returns the value of attribute buffer.
-
#touchscreen ⇒ Object
readonly
Returns the value of attribute touchscreen.
Instance Method Summary collapse
- #by_keys(keys) ⇒ Object
-
#initialize(path = nil) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(path = nil) ⇒ Config
Returns a new instance of Config.
11 12 13 14 15 |
# File 'lib/touchscreen_taps/config.rb', line 11 def initialize(path = nil) @buffer = fetch_buffer @touchscreen = fetch_touchscreen @config = fetch_config(path) end |
Instance Attribute Details
#buffer ⇒ Object (readonly)
Returns the value of attribute buffer.
8 9 10 |
# File 'lib/touchscreen_taps/config.rb', line 8 def buffer @buffer end |
#touchscreen ⇒ Object (readonly)
Returns the value of attribute touchscreen.
9 10 11 |
# File 'lib/touchscreen_taps/config.rb', line 9 def touchscreen @touchscreen end |
Instance Method Details
#by_keys(keys) ⇒ Object
17 18 19 |
# File 'lib/touchscreen_taps/config.rb', line 17 def by_keys(keys) @config.dig(*keys) end |