(ruby noob here..apologies if I’m not asking the question correctly)
So I have two files, one contains a module which holds a class….
file_alpha.rb :
class alpha
def a_name
do stuff
end
end
file_beta.rb:
module STUFF_IN_BETA
class beta
def b_name
do more stuff
end
end
end
So I want to access ‘def b_name’ inside file_alpha but I’m not sure how…
class alpha
def a_name
do stuff
b_name() <----HOW TO DO this?
end
end
How do I make the method ‘b_name’ available to class alpha?
You need to include your class
require ‘b.rb’
And then call the method
b.b()