Class: Obfusc::CLI
- Inherits:
-
Object
- Object
- Obfusc::CLI
- Defined in:
- lib/obfusc/cli.rb
Overview
This model receive and process ARGV from ./exe/obfusc script
Constant Summary collapse
- VALID_COMMANDS =
%w[setup crypt decrypt show].freeze
Instance Attribute Summary collapse
-
#argumetns ⇒ Object
readonly
Returns the value of attribute argumetns.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(arguments) ⇒ CLI
constructor
A new instance of CLI.
- #run ⇒ Object
Constructor Details
#initialize(arguments) ⇒ CLI
Returns a new instance of CLI.
10 11 12 13 |
# File 'lib/obfusc/cli.rb', line 10 def initialize(arguments) @arguments = arguments @options = {} end |
Instance Attribute Details
#argumetns ⇒ Object (readonly)
Returns the value of attribute argumetns.
8 9 10 |
# File 'lib/obfusc/cli.rb', line 8 def argumetns @argumetns end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/obfusc/cli.rb', line 8 def @options end |
Instance Method Details
#run ⇒ Object
15 16 17 18 |
# File 'lib/obfusc/cli.rb', line 15 def run configure perform(@arguments.shift) end |