Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #amodule.rb
- #!/usr/bin/ruby
- module RubyModule
- def do_something
- #do nothing
- end
- end
- #main.rb
- #!/usr/bin/ruby
- require './amodule.rb'
- RubyModule.do_something
- #When I run "ruby main.rb", I get the following error:
- #main.rb:5:in `<main>': undefined local variable or method `do_something' for main:Object (NameError)
Advertisement
Add Comment
Please, Sign In to add comment