Class: Redirus::CLI

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/redirus/cli.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



15
16
17
# File 'lib/redirus/cli.rb', line 15

def options
  @options
end

Instance Method Details

#parse(args = ARGV) ⇒ Object



17
18
19
20
# File 'lib/redirus/cli.rb', line 17

def parse(args = ARGV)
  init_options(args)
  validate!
end

#runObject



22
23
24
# File 'lib/redirus/cli.rb', line 22

def run
  add? ? add : rm
end