class LaunchdTools::PathParser

Attributes

path[R]
xml_doc[R]

Public Class Methods

new(path) click to toggle source
# File lib/launchd_tools/path_parser.rb, line 11
def initialize(path)
  @path = path
end

Public Instance Methods

parse() click to toggle source

returns a parsed launchd job

# File lib/launchd_tools/path_parser.rb, line 16
def parse
  LaunchdJob.new({ 'EnvironmentVariables' => parse_env, 'ProgramArguments' => parse_program_args })
end
parse_env() click to toggle source
# File lib/launchd_tools/path_parser.rb, line 20
def parse_env
  variables = EnvironmentParser.new(xml_doc).parse
  EnvironmentVariables.new(variables).to_a
end
parse_program_args() click to toggle source
# File lib/launchd_tools/path_parser.rb, line 25
def parse_program_args
  ProgramArgsParser.new(xml_doc).parse
end