Class: Spiker::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/spiker/cli.rb

Overview

Accept options “simple”, “given”, or “multi”. Both Simple and Given create “single file” spikes with the tests and spike code in a single file. The Multi option creates a more traditionally structured spike directory with tests, code, README, etc. That is all.

Instance Method Summary collapse

Instance Method Details

#given(name) ⇒ Object



29
30
31
# File 'lib/spiker/cli.rb', line 29

def given(name)
  Spiker::Generators::GivenOption.start([name])
end

#multiple(name) ⇒ Object



35
36
37
# File 'lib/spiker/cli.rb', line 35

def multiple(name)
  Spiker::Generators::Multi.start([name])
end

#simple(name) ⇒ Object



23
24
25
# File 'lib/spiker/cli.rb', line 23

def simple(name)
  Spiker::Generators::Simple.start([name])
end

#versionObject



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

def version
  puts "Spiker version #{Spiker::VERSION}"
end