Class: GemGenerator

Inherits:
Genosaurus
  • Object
show all
Defined in:
lib/gemstub/gem_generator/gem_generator.rb

Instance Method Summary collapse

Instance Method Details

#appObject



5
6
7
# File 'lib/gemstub/gem_generator/gem_generator.rb', line 5

def app
  param(:app)
end

#authorObject



13
14
15
# File 'lib/gemstub/gem_generator/gem_generator.rb', line 13

def author
  param(:author) || (ENV["USERNAME"] || ENV["USER"])
end

#rspec?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/gemstub/gem_generator/gem_generator.rb', line 21

def rspec?
  test == 'rspec'
end

#testObject



17
18
19
# File 'lib/gemstub/gem_generator/gem_generator.rb', line 17

def test
  param(:test) || 'rspec'
end

#unit?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/gemstub/gem_generator/gem_generator.rb', line 25

def unit?
  test == 'unit'
end

#versionObject



9
10
11
# File 'lib/gemstub/gem_generator/gem_generator.rb', line 9

def version
  param(:version) || '0.0.1'
end