rake/extensiontask.rb
# Convenience function for cnstructing command lines for build tools.
Convenience function for cnstructing command lines for build tools.
Convenience function for cnstructing command lines for build tools .
def optify( *opts )
      return optify(*opts.first)  if opts.size == 1 and opts.first.kind_of? Array
      opts.collect do |opt|
        case opt
          when String then  opt
          when Symbol then  optify env[opt]
          when Hash
            opt.collect do |k, v|
              v = env[v]  if v.kind_of? Symbol
              if v.kind_of? Array
                optify v.collect { |w| k.to_s + w.to_s }
              elsif v
                k.to_s + v.to_s
              end
            end
          else
            opt.to_s
        end
      end.join(' ').squeeze(' ')
    end
def optify ( * opts ) return optify ( * opts . first ) if opts . size == 1 and opts . first . kind_of? Array opts . collect do | opt | case opt when String then opt when Symbol then optify env [ opt ] when Hash opt . collect do | k , v | v = env [ v ] if v . kind_of? Symbol if v . kind_of? Array optify v . collect { | w | k . to_s + w . to_s } elsif v k . to_s + v . to_s end end else opt . to_s end end . join ( ' ' ) . squeeze ( ' ' ) end
Convenience function for cnstructing command lines for build tools.
Convenience function for cnstructing command lines for build tools .
opts
<not_specific>