Class: Guard::Focus

Inherits:
Guard
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/guard/focus.rb,
lib/guard/focus/libraries.rb

Defined Under Namespace

Classes: Libraries

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(watchers = [], options = {}) ⇒ Focus

Returns a new instance of Focus.



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

def initialize(watchers=[], options={})
  super
  @library = Libraries[options[:on]]
end

Instance Attribute Details

#focusedObject (readonly)

Returns the value of attribute focused.



13
14
15
# File 'lib/guard/focus.rb', line 13

def focused
  @focused
end

#libraryObject (readonly)

Returns the value of attribute library.



13
14
15
# File 'lib/guard/focus.rb', line 13

def library
  @library
end

#pathsObject (readonly)

Returns the value of attribute paths.



13
14
15
# File 'lib/guard/focus.rb', line 13

def paths
  @paths
end

Instance Method Details

#run_allObject



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

def run_all
  success?([base_path])
end

#run_on_change(files) ⇒ Object



24
25
26
# File 'lib/guard/focus.rb', line 24

def run_on_change(files)
  success?(files)
end