Class: Uncool::App
- Inherits:
-
Object
- Object
- Uncool::App
- Defined in:
- lib/uncool/app.rb
Instance Attribute Summary collapse
-
#namespaces ⇒ Object
(also: #targets)
readonly
Returns the value of attribute namespaces.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #analysis ⇒ Object
- #generate(scripts) ⇒ Object
-
#initialize(options = {}) ⇒ App
constructor
A new instance of App.
-
#log(logdir = nil) ⇒ Object
This is the main method for activating hte trace and recording the results.
- #report ⇒ Object
- #trace ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ App
Returns a new instance of App.
10 11 12 13 |
# File 'lib/uncool/app.rb', line 10 def initialize(={}) @options = @namespaces = [:namespaces] end |
Instance Attribute Details
#namespaces ⇒ Object (readonly) Also known as: targets
Returns the value of attribute namespaces.
16 17 18 |
# File 'lib/uncool/app.rb', line 16 def namespaces @namespaces end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
22 23 24 |
# File 'lib/uncool/app.rb', line 22 def @options end |
Instance Method Details
#analysis ⇒ Object
35 36 37 |
# File 'lib/uncool/app.rb', line 35 def analysis @analysis ||= Analysis.new(trace, ) end |
#generate(scripts) ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/uncool/app.rb', line 57 def generate(scripts) require 'uncool/generator/ko' require 'uncool/generator/qed' require 'uncool/generator/lemon' generator = ( case [:framework] when :ko GeneratorKO.new() when :qed GeneratorQED.new() when :rspec #GeneratorRSpec.new(options) when :cuke, :cucumber #GeneratorCucumber.new(options) else GeneratorLemon.new() end ) scripts.each{ |script| require(script) } generator.generate end |
#log(logdir = nil) ⇒ Object
This is the main method for activating hte trace and recording the results.
46 47 48 49 50 51 52 53 54 |
# File 'lib/uncool/app.rb', line 46 def log(logdir=nil) logdir = logdir || [:output] trace.setup at_exit { trace.deactivate logdir ? report.save(logdir) : report.display } trace.activate end |