class Modelist::CLI

Public Instance Methods

circular(*args) click to toggle source
# File lib/modelist/cli.rb, line 28
def circular(*args)
  # load Rails environment
  require './config/environment'
  require 'modelist/circular_ref_checker'
  args.each {|a| puts "Unsupported option: #{args.delete(a)}" if a.to_s.starts_with?('-')}
  exit ::Modelist::CircularRefChecker.test_models(*args) ? 0 : 1
end
paths(*args) click to toggle source
# File lib/modelist/cli.rb, line 46
def paths(*args)
  # load Rails environment
  require './config/environment'      
  args.each {|a| puts "Unsupported option: #{args.delete(a)}" if a.to_s.starts_with?('-')}
  exit ::Modelist::PathFinder.find_all(*args) ? 0 : 1
end
required(*args) click to toggle source
# File lib/modelist/cli.rb, line 17
def required(*args)
  # load Rails environment
  require './config/environment'
  require 'modelist/analyst'
  args.each {|a| puts "Unsupported option: #{args.delete(a)}" if a.to_s.starts_with?('-')}
  Modelist::Analyst.find_required_models(*args)
  exit 0
end
test(*args) click to toggle source
# File lib/modelist/cli.rb, line 8
def test(*args)
  # load Rails environment
  require './config/environment'
  require 'modelist/tester'
  args.each {|a| puts "Unsupported option: #{args.delete(a)}" if a.to_s.starts_with?('-')}
  exit ::Modelist::Tester.test_models(*args) ? 0 : 1
end