Class: Ambient::PlistHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/ambient/plist_helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ PlistHelper

Returns a new instance of PlistHelper.



5
6
7
# File 'lib/ambient/plist_helper.rb', line 5

def initialize(path)
  @path = path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



3
4
5
# File 'lib/ambient/plist_helper.rb', line 3

def path
  @path
end

Instance Method Details

#add_entry(key, value) ⇒ Object



9
10
11
12
13
# File 'lib/ambient/plist_helper.rb', line 9

def add_entry(key, value)
  plist_as_dictionary[key] = value
  puts "applying to plist: #{path} #{key}"
  save
end