Method: DepsGrapher::Source#initialize
- Defined in:
- lib/deps_grapher/source.rb
#initialize(name, &block) ⇒ Source
Returns a new instance of Source.
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/deps_grapher/source.rb', line 7 def initialize(name, &block) @name = name @include_pattern = nil @exclude_pattern = nil DSL.new(self).instance_eval(&block) assert! @glob_pattern = Array(glob_pattern.presence || File.join("**", "*.rb")).each_with_object([]) do |pattern, array| array << File.join(root, pattern) end end |