module Lizard

Constants

COLOR_PROFILES
VERSION

Public Class Methods

root() click to toggle source
# File lib/lizard.rb, line 4
def self.root
  File.expand_path('../../', __FILE__)
end
run_command(command, input = nil) click to toggle source
# File lib/lizard.rb, line 8
def self.run_command(command, input = nil)
  command = [command] unless command.is_a?(Array)
  stdin, stdout, stderr, wait_thr = Open3.popen3(*command)
  stdin.binmode
  stdout.binmode
  stderr.binmode
  stdin.write(input) if input
  stdin.close
  [stdout.read, stderr.read, wait_thr.value.to_i]
end