Module: Lemon
- Defined in:
- lib/lemon.rb,
lib/lemon.rb,
lib/lemon/cli.rb,
lib/lemon/cli/base.rb,
lib/lemon/cli/test.rb,
lib/lemon/generator.rb,
lib/lemon/test_case.rb,
lib/lemon/test_proc.rb,
lib/lemon/test_class.rb,
lib/lemon/test_setup.rb,
lib/lemon/test_world.rb,
lib/lemon/test_advice.rb,
lib/lemon/test_method.rb,
lib/lemon/test_module.rb,
lib/lemon/cli/coverage.rb,
lib/lemon/cli/generate.rb,
lib/lemon/coverage/analyzer.rb,
lib/lemon/coverage/snapshot.rb,
lib/lemon/coverage/cover_unit.rb,
lib/lemon/coverage/source_parser.rb
Defined Under Namespace
Modules: CLI, CoverReports, DSL Classes: CoverUnit, CoverageAnalyzer, Generator, Snapshot, SourceParser, TestAdvice, TestCase, TestClass, TestMethod, TestModule, TestProc, TestSetup, World
Class Method Summary collapse
-
.cli(*argv) ⇒ Object
Command line interface takes the first argument off ‘argv` to determine the subcommand: `test`, `cov` or `gen`.
-
.const_missing(name) ⇒ Object
Access to project metadata as constants.
-
.metadata ⇒ Object
Access to metadata.
Class Method Details
.cli(*argv) ⇒ Object
Command line interface takes the first argument off ‘argv` to determine the subcommand: `test`, `cov` or `gen`. If `test`, then Lemon delegates control to Ruby Test.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/lemon/cli.rb', line 15 def self.cli(*argv) cmd = argv.shift case cmd when 'test' require 'lemon' require 'test/cli' Test::Runner.cli(*ARGV) #Lemon::CLI::Test.new.run(argv) when /^gen/, /^scaf/ Lemon::CLI::Generate.new.run(argv) when /^cov/ Lemon::CLI::Coverage.new.run(argv) else # run tests instead? puts "invalid lemon command -- #{cmd}" exit -1 end end |
.const_missing(name) ⇒ Object
Access to project metadata as constants.
12 13 14 15 |
# File 'lib/lemon.rb', line 12 def self.const_missing(name) key = name.to_s.downcase [key] || super(name) end |
.metadata ⇒ Object
Access to metadata.
4 5 6 7 8 9 |
# File 'lib/lemon.rb', line 4 def self. @metadata ||= ( require 'yaml' YAML.load(File.new(File.dirname(__FILE__) + '/lemon.yml')) ) end |