Class: Guard::Nanoc

Inherits:
Plugin
  • Object
show all
Defined in:
lib/guard/nanoc.rb,
lib/guard/nanoc/live_command.rb

Defined Under Namespace

Classes: LiveCommand

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Nanoc

Returns a new instance of Nanoc.



17
18
19
20
# File 'lib/guard/nanoc.rb', line 17

def initialize(options = {})
  @dir = options[:dir] || '.'
  super
end

Class Method Details

.live_cmdObject



10
11
12
13
14
15
# File 'lib/guard/nanoc.rb', line 10

def self.live_cmd
  @_live_cmd ||= begin
    path = File.join(File.dirname(__FILE__), 'nanoc', 'live_command.rb')
    Cri::Command.load_file(path, infer_name: true)
  end
end

Instance Method Details

#run_allObject



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

def run_all
  recompile_in_subprocess
end

#run_on_changes(_paths) ⇒ Object



31
32
33
# File 'lib/guard/nanoc.rb', line 31

def run_on_changes(_paths)
  recompile_in_subprocess
end

#run_on_removals(_paths) ⇒ Object



35
36
37
# File 'lib/guard/nanoc.rb', line 35

def run_on_removals(_paths)
  recompile_in_subprocess
end

#startObject



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

def start
  setup_listeners
  recompile_in_subprocess
end