Class: Rake::ProcessStatusLine

Inherits:
Struct
  • Object
show all
Defined in:
lib/only_one_rake.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cObject

Returns the value of attribute c

Returns:

  • (Object)

    the current value of c



4
5
6
# File 'lib/only_one_rake.rb', line 4

def c
  @c
end

#cmdObject

Returns the value of attribute cmd

Returns:

  • (Object)

    the current value of cmd



4
5
6
# File 'lib/only_one_rake.rb', line 4

def cmd
  @cmd
end

#pidObject

Returns the value of attribute pid

Returns:

  • (Object)

    the current value of pid



4
5
6
# File 'lib/only_one_rake.rb', line 4

def pid
  @pid
end

#ppidObject

Returns the value of attribute ppid

Returns:

  • (Object)

    the current value of ppid



4
5
6
# File 'lib/only_one_rake.rb', line 4

def ppid
  @ppid
end

#stimeObject

Returns the value of attribute stime

Returns:

  • (Object)

    the current value of stime



4
5
6
# File 'lib/only_one_rake.rb', line 4

def stime
  @stime
end

#timeObject

Returns the value of attribute time

Returns:

  • (Object)

    the current value of time



4
5
6
# File 'lib/only_one_rake.rb', line 4

def time
  @time
end

#ttyObject

Returns the value of attribute tty

Returns:

  • (Object)

    the current value of tty



4
5
6
# File 'lib/only_one_rake.rb', line 4

def tty
  @tty
end

#uidObject

Returns the value of attribute uid

Returns:

  • (Object)

    the current value of uid



4
5
6
# File 'lib/only_one_rake.rb', line 4

def uid
  @uid
end

Instance Method Details

#namespace_equal?(namespace) ⇒ Boolean

Returns:

  • (Boolean)


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

def namespace_equal? namespace
  self.cmd.split.select {|i| i.match(/:/) }[0] == namespace
end

#working_dir_equal?(working_dir) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/only_one_rake.rb', line 9

def working_dir_equal? working_dir
  !!(`lsof -p #{self.pid} | grep cwd | grep DIR`.split[-1].match(working_dir))
end