class PPL::Command::New

Public Class Methods

new(argv) click to toggle source
Calls superclass method PPL::Command::new
# File lib/pod-pipeline/command/new.rb, line 27
def initialize(argv)
    @name           = argv.shift_argument
    
    super
end
options() click to toggle source
Calls superclass method PPL::Command::options
# File lib/pod-pipeline/command/new.rb, line 17
def self.options
    [].concat(super).concat(options_extension)
end
options_extension_hash() click to toggle source
# File lib/pod-pipeline/command/new.rb, line 21
def self.options_extension_hash
    Hash[
        'lib-create' => Pod::Command::Lib::Create.options,
    ]
end

Public Instance Methods

run() click to toggle source
# File lib/pod-pipeline/command/new.rb, line 33
def run
    const_name = 'TEMPLATE_REPO'
    if Pod::Command::Lib::Create.const_defined?(const_name)
        Pod::Command::Lib::Create.send(:remove_const, const_name)
        Pod::Command::Lib::Create.const_set(const_name, 'https://github.com/TokiPods/pod-template.git'.freeze)
    end
    Pod::Command::Lib::Create.run([@name] + argv_extension['lib-create'])
end