Methods
load new parse to_s
Attributes
[R] args
[R] cmd
Public Class methods
load(path)
# File lib/setup/install.rb, line 245
      def Shebang.load(path)
        line = nil
        File.open(path) {|f|
          line = f.gets
        }
        return nil unless /\A#!/ =~ line
        parse(line)
      end
new(cmd, args = [])
# File lib/setup/install.rb, line 259
      def initialize(cmd, args = [])
        @cmd = cmd
        @args = args
      end
parse(line)
# File lib/setup/install.rb, line 254
      def Shebang.parse(line)
        cmd, *args = *line.strip.sub(/\A\#!/, '').split(' ')
        new(cmd, args)
      end
Public Instance methods
to_s()
# File lib/setup/install.rb, line 267
      def to_s
        "#! #{@cmd}" + (@args.empty? ? '' : " #{@args.join(' ')}")
      end