Last active
February 18, 2021 08:34
-
-
Save ashaninBenjamin/c36737da26c354c9540e0329008dc19b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment