Class: Spiker::CLI

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

Overview

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

Instance Method Summary collapse

Instance Method Details

#given(spike_name) ⇒ Object



25
26
27
# File 'lib/spiker/cli.rb', line 25

def given(spike_name)
  Spiker::Generators::Given.new([spike_name], generator_options).invoke_all
end

#multi(spike_name) ⇒ Object



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

def multi(spike_name)
  Spiker::Generators::Multi.new([spike_name], generator_options).invoke_all
end

#rspec(spike_name) ⇒ Object



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

def rspec(spike_name)
  Spiker::Generators::Rspec.new([spike_name], generator_options).invoke_all
end

#simple(spike_name) ⇒ Object



20
21
22
# File 'lib/spiker/cli.rb', line 20

def simple(spike_name)
  Spiker::Generators::Simple.new([spike_name], generator_options).invoke_all
end

#versionObject



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

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