Class: Simnos::CLI
- Inherits:
-
Object
- Object
- Simnos::CLI
- Defined in:
- lib/simnos/cli.rb
Defined Under Namespace
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(argv) ⇒ CLI
constructor
A new instance of CLI.
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ CLI
Returns a new instance of CLI.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/simnos/cli.rb', line 11 def initialize(argv) @argv = argv.dup @help = argv.empty? @filepath = 'SNSfile' = { color: true, includes: [], excludes: [], } parser.order!(@argv) end |
Class Method Details
.start(argv) ⇒ Object
7 8 9 |
# File 'lib/simnos/cli.rb', line 7 def self.start(argv) new(argv).run end |
Instance Method Details
#run ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/simnos/cli.rb', line 23 def run if @help puts parser.help elsif @apply Apply.new(@filepath, ).run elsif @export Export.new(@filepath, ).run end end |