Calling another class method with local variable as parameter - Ruby : Hi I have this scenario:

File a.rb

    class a
      def methodA
        variable = secureRandom.hex(4)
        #do some things
        b(variable)
      end
    end
File b.rb

    class b
      def methodB(parameter)
        puts parameter
      end
    end  

I avoid details about includes but suppose that everything is ok.
"variable" its a simple string and I just want to pass that string in a variable to a method from another class. Just the value, but things goes wrong!
This code generates the following error: 
"Undefined local variable or method `randomName' "
I am a newbie in Ruby, what am I doing wrong?
I have read a lot about variable scopes I have a huge confusion.

      