Class: WPMove::Commands

Inherits:
Object
  • Object
show all
Defined in:
lib/wp-move.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Commands

Returns a new instance of Commands.



3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/wp-move.rb', line 3

def initialize(args)
  first_arg = args[0]
  second_arg = args[1]

  WPMove::Main.test

  if first_arg == 'rename'
    WPMove::Main.rename(second_arg)
  elsif first_arg == 'current'
    puts WPMove::Main.wp_current_url
  else
    # help
  end
end