Last active
February 18, 2021 08:34
-
-
Save ashaninBenjamin/c36737da26c354c9540e0329008dc19b to your computer and use it in GitHub Desktop.
Revisions
-
ashaninBenjamin revised this gist
Feb 18, 2021 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,7 @@ 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 -
ashaninBenjamin created this gist
Feb 17, 2021 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ #!/usr/bin/env ruby APP_PATH = File.expand_path('../config/application', __FILE__) require File.expand_path('../config/environment', __FILE__) require_relative 'config/boot' 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)