Class: MotionBlender::RakeTasks

Inherits:
Object
  • Object
show all
Defined in:
lib/motion_blender/rake_tasks.rb

Instance Method Summary collapse

Instance Method Details

#analyzeObject



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/motion_blender/rake_tasks.rb', line 11

def analyze
  analyzer = Analyzer.new
  analyzer.exclude_files += builtin_features + config.excepted_files
  Motion::Project::App.setup do |app|
    files = config.incepted_files + app.files
    files.flatten.each do |file|
      analyzer.analyze file
    end
    apply analyzer, app if analyzer.files.any?
  end
end

#apply(analyzer, app) ⇒ Object



23
24
25
26
27
28
# File 'lib/motion_blender/rake_tasks.rb', line 23

def apply analyzer, app
  new_files = analyzer.files - app.files
  app.exclude_from_detect_dependencies += new_files
  app.files = new_files + app.files
  app.files_dependencies analyzer.dependencies
end

#builtin_featuresObject



30
31
32
# File 'lib/motion_blender/rake_tasks.rb', line 30

def builtin_features
  %w(bigdecimal rational date thread)
end

#configObject



7
8
9
# File 'lib/motion_blender/rake_tasks.rb', line 7

def config
  MotionBlender.config
end