Class: RMonitor
- Inherits:
-
Object
- Object
- RMonitor
- Defined in:
- lib/rmonitor.rb,
lib/rmonitor/devices.rb,
lib/rmonitor/version.rb,
lib/rmonitor/profiles.rb,
lib/rmonitor/helpers/dsl_helpers.rb,
lib/rmonitor/helpers/profile_helpers.rb,
lib/rmonitor/helpers/xrandr_read_helpers.rb,
lib/rmonitor/helpers/xrandr_write_helpers.rb
Defined Under Namespace
Modules: DSLHelpers, ProfileHelpers, XRandRReadHelpers, XRandRWriteHelpers Classes: Devices, Profiles, XRandRArgumentError
Constant Summary collapse
- VERSION =
'1.0.1'
Class Attribute Summary collapse
-
.config_path ⇒ Object
Returns the value of attribute config_path.
Instance Attribute Summary collapse
-
#devices ⇒ Object
Returns the value of attribute devices.
-
#profiles ⇒ Object
Returns the value of attribute profiles.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(raw_devices_data, raw_profiles_data) ⇒ RMonitor
constructor
A new instance of RMonitor.
Constructor Details
#initialize(raw_devices_data, raw_profiles_data) ⇒ RMonitor
Returns a new instance of RMonitor.
15 16 17 18 |
# File 'lib/rmonitor.rb', line 15 def initialize(raw_devices_data, raw_profiles_data) @devices = Devices.parse(raw_devices_data) @profiles = Profiles.parse(raw_profiles_data) end |
Class Attribute Details
.config_path ⇒ Object
Returns the value of attribute config_path.
10 11 12 |
# File 'lib/rmonitor.rb', line 10 def config_path @config_path end |
Instance Attribute Details
#devices ⇒ Object
Returns the value of attribute devices.
13 14 15 |
# File 'lib/rmonitor.rb', line 13 def devices @devices end |
#profiles ⇒ Object
Returns the value of attribute profiles.
13 14 15 |
# File 'lib/rmonitor.rb', line 13 def profiles @profiles end |
Class Method Details
.load ⇒ Object
20 21 22 |
# File 'lib/rmonitor.rb', line 20 def self.load self.new(`xrandr -q`, File.new(config_path).read) end |