Sha256: 8b471b642d249da6e201986b63d367d9f8b10db88f88c88c1ef2fde1c31f20dd

Contents?: true

Size: 581 Bytes

Versions: 2

Compression:

Stored size: 581 Bytes

Contents

class Application
  @@applications
  def initialize
    @@applications = `/usr/bin/whereis php node mysql vim python ruby java apache2 nginx openssl vsftpd make'.'| /usr/bin/awk '{ split($1, a, ":");if (length($2)==0) print a[1]",not"; else print a[1]","$2;}'`
  end
  
  def parse
    @@applications = @@applications.split("\n")
    $return_data = {}
    $i = 0
    @@applications.each do |line|
      line = line.split(",")
      $i += 1
      $return_data[$i] = {
        'application' => line[0],
        'status' => line[1]
      }
    end
    
    $return_data
    
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
miranda-0.0.3 lib/miranda/system/linux/application.rb
miranda-0.0.2 lib/miranda/system/linux/application.rb