Class: J1::Commands::Patch

Inherits:
J1::Command show all
Defined in:
lib/j1/commands/patch.rb

Class Method Summary collapse

Methods inherited from J1::Command

inherited, subclasses

Class Method Details

.init_with_program(prog) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/j1/commands/patch.rb', line 9

def init_with_program(prog)
  prog.command(:patch) do |c|
    c.description 'Install patches available for J1 projects'
    c.syntax 'patch'
    c.option 'force', '--force',                'Force to install patches even already exists'
    c.option 'system', '--system',              'Install patches on the Ruby SYSTEM gem folder'
    c.action do |args, options|
      J1::Commands::Patch.process(args, options)
    end
  end
end

.process(args, options = {}) ⇒ Object



21
22
23
24
# File 'lib/j1/commands/patch.rb', line 21

def process(args, options = {})
  @args = args
  patch_install(options)
end