Module: Plister
- Defined in:
- lib/plister.rb,
lib/plister/plist.rb,
lib/plister/version.rb,
lib/plister/preferences.rb
Defined Under Namespace
Classes: Plist, Preferences
Constant Summary
collapse
- VERSION =
'0.1.1'.freeze
Class Method Summary
collapse
Class Method Details
.preferences(path = nil) ⇒ Object
.user ⇒ Object
15
16
17
|
# File 'lib/plister.rb', line 15
def user
@user ||= `logname`.strip
end
|
.uuid ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/plister.rb', line 19
def uuid
@uuid ||= begin
uuid = `ioreg -rd1 -c IOPlatformExpertDevice`
matches = uuid.match(/"IOPlatformUUID" = "([0-9A-F-]{36})"/)
matches[1] if matches
end
end
|