Class: Plist4r::PlistType::Launchd::MachServices
- Defined in:
- lib/plist4r/plist_type/launchd.rb
Classes
Instance Methods
Methods inherited from Plist4r::ArrayDict
#hash, #initialize, #select, #select_all, #to_hash, #unselect, #unselect_all
Methods included from Plist4r::DataMethods
#_respond_to?, #method_missing, #set_or_return, #set_or_return_of_type, #validate_value
Constant Summary
Constants included from Plist4r::DataMethods
ClassesForKeyType, ValidKeys, ValidKeysTemplate
Constructor Details
This class inherits a constructor from Plist4r::ArrayDict
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Plist4r::DataMethods
Instance Method Details
- (Object) add(service, value = nil, &blk)
384 385 386 387 388 389 390 391 392 393 394 |
# File 'lib/plist4r/plist_type/launchd.rb', line 384 def add service, value=nil, &blk if value @hash[service] = value set_or_return_of_type :bool, service, value elsif blk @hash[service] = ::Plist4r::OrderedHash.new @hash[service] = MachServices::MachService.new(@hash[service],&blk).to_hash else @orig end end |