Class: Guard::Yardstick

Inherits:
Plugin
  • Object
show all
Defined in:
lib/guard/yardstick.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Yardstick

Returns a new instance of Yardstick.



7
8
9
10
11
12
13
14
# File 'lib/guard/yardstick.rb', line 7

def initialize(options = {})
  super

  @options = {
    all_on_start: true,
    cli: ['./**/*.rb']
  }.merge(options)
end

Instance Method Details

#run_allObject



20
21
22
23
# File 'lib/guard/yardstick.rb', line 20

def run_all
  UI.info 'Inspecting Yarddoc in all files'
  system(build_command)
end

#startObject



16
17
18
# File 'lib/guard/yardstick.rb', line 16

def start
  run_all if @options[:all_on_start]
end