Class: Guard::Unity

Inherits:
Plugin
  • Object
show all
Defined in:
lib/guard/unity.rb,
lib/guard/unity/parser.rb,
lib/guard/unity/runner.rb,
lib/guard/unity/options.rb,
lib/guard/unity/notifier.rb,
lib/guard/unity/notifier/cli.rb,
lib/guard/unity/notifier/alert.rb

Defined Under Namespace

Modules: Options Classes: Notifier, Parser, Runner

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Unity

Returns a new instance of Unity.



12
13
14
15
16
# File 'lib/guard/unity.rb', line 12

def initialize(options = {})
  super
  @options  = Options.with_defaults(options)
  @runner   = Runner.new(@options)
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



10
11
12
# File 'lib/guard/unity.rb', line 10

def options
  @options
end

#runnerObject

Returns the value of attribute runner.



10
11
12
# File 'lib/guard/unity.rb', line 10

def runner
  @runner
end

Instance Method Details

#reloadObject



27
28
# File 'lib/guard/unity.rb', line 27

def reload
end

#run_allObject



30
31
32
# File 'lib/guard/unity.rb', line 30

def run_all
  puts runner.run
end

#run_on_modifications(paths) ⇒ Object



23
24
25
# File 'lib/guard/unity.rb', line 23

def run_on_modifications(paths)
  puts runner.run
end

#startObject



18
19
20
21
# File 'lib/guard/unity.rb', line 18

def start
  _show_start_message
  puts runner.run if _should_test_on_start?
end