Class: JSHint4r::Target

Inherits:
Object
  • Object
show all
Defined in:
lib/jshint4r/target.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(targets, excludes = nil) ⇒ Target

Returns a new instance of Target.



5
6
7
8
# File 'lib/jshint4r/target.rb', line 5

def initialize( targets, excludes = nil )
  @targets  = targets  || []
  @excludes = excludes || []
end

Instance Attribute Details

#excludesObject (readonly)

Returns the value of attribute excludes.



9
10
11
# File 'lib/jshint4r/target.rb', line 9

def excludes
  @excludes
end

#targetsObject (readonly)

Returns the value of attribute targets.



9
10
11
# File 'lib/jshint4r/target.rb', line 9

def targets
  @targets
end

Instance Method Details

#each(&block) ⇒ Object



11
12
13
14
15
# File 'lib/jshint4r/target.rb', line 11

def each( &block )
  real_targets.each { |f|
    block.call( f )
  }
end

#real_targetsObject

return

Rake::FileList



20
21
22
23
24
25
26
# File 'lib/jshint4r/target.rb', line 20

def real_targets
  if ( !@real_targets )
    @real_targets = target_files
  end

  @real_targets
end