1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#my ruby environment variable in .bashrc
RUBYLIB=/Users/m.hansen/biopieces/code_ruby


#path to test module/class
/Users/m.hansen/biopieces/code_ruby/Maasha/test.rb

#content of /Users/m.hansen/biopieces/code_ruby/Maasha/test.rb
class Test
    puts "Modules Test loaded"

    def greet_world
        puts "Hello World"
    end
end


#path to test script
~/test.rb

# content of test script
require 'Maasha/test'

foo = Test.new

foo.greet_world

puts "end"

exit


#output ruby test.rb 

Modules Test loaded
Hello World
end