Class: TouchscreenTaps::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/touchscreen_taps/config.rb

Overview

Holds main configurations

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bufferObject (readonly)

Returns the value of attribute buffer.



8
9
10
# File 'lib/touchscreen_taps/config.rb', line 8

def buffer
  @buffer
end

#touchscreenObject (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