Sha256: 841658e3f614268de37ee409b794925631bfb9a9fe72f4c69162a907f6551820

Contents?: true

Size: 599 Bytes

Versions: 6

Compression:

Stored size: 599 Bytes

Contents

require 'padrino-core/command'

module Padrino
  ##
  # This method return the correct location of padrino-gen bin or
  # exec it using Kernel#system with the given args
  #
  # @param [Array<String>] args
  #   Splat of arguments to pass to padrino-gen
  #
  # @example
  #   Padrino.bin_gen(:app, name.to_s, "-r=#{destination_root}")
  #
  # @api semipublic
  def self.bin_gen(*args)
    @_padrino_gen_bin ||= [Padrino.ruby_command, File.expand_path("../../../bin/padrino-gen", __FILE__)]
    args.empty? ? @_padrino_gen_bin : system(args.unshift(@_padrino_gen_bin).join(" "))
  end
end # Padrino

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
padrino-gen-0.10.6.c lib/padrino-gen/command.rb
padrino-gen-0.10.6.b lib/padrino-gen/command.rb
padrino-gen-0.10.6.a lib/padrino-gen/command.rb
padrino-gen-0.10.5 lib/padrino-gen/command.rb
padrino-gen-0.10.4 lib/padrino-gen/command.rb
padrino-gen-0.10.3 lib/padrino-gen/command.rb