Class: AnnotateRb::Commands::AnnotateModels

Inherits:
Object
  • Object
show all
Defined in:
lib/annotate_rb/commands/annotate_models.rb

Instance Method Summary collapse

Instance Method Details

#call(options) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/annotate_rb/commands/annotate_models.rb', line 6

def call(options)
  puts "Annotating models"

  if options[:debug]
    puts "Running with debug mode, options:"
    pp options.to_h
  end

  # Eager load Models when we're annotating models
  AnnotateRb::EagerLoader.call(options)

  AnnotateRb::ModelAnnotator::Annotator.send(options[:target_action], options)
end