Skip to content

Instantly share code, notes, and snippets.

@dennisfaust
Created August 20, 2014 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dennisfaust/725e81aa02ea2a9f90e7 to your computer and use it in GitHub Desktop.
Save dennisfaust/725e81aa02ea2a9f90e7 to your computer and use it in GitHub Desktop.
Ruby: Use a method directly from a module...
module Moddy
def show_me
puts "Yop"
end
end
Class.new.extend(Moddy).show_me
Yop
# this may come in handy also:
# require Dir.pwd+'path_to_module'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment