#!/usr/bin/env ruby APP_PATH = File.expand_path('../config/application', __FILE__) require File.expand_path('../config/environment', __FILE__) require_relative 'config/boot' ActiveRecord::Base.logger = ActiveSupport::Logger.new(STDOUT) module Mod module_function def method1 'method1' end def method2 'method2' end end method = ARGV[0] raise ArgumentError, 'mo method passed' unless method puts "#{method}..." puts Mod.send(method)