Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8935103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:55:15+00:00 2026-06-15T09:55:15+00:00

(ruby noob here..apologies if I’m not asking the question correctly) So I have two

  • 0

(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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:55:16+00:00Added an answer on June 15, 2026 at 9:55 am

    You need to include your class
    require ‘b.rb’

    And then call the method
    b.b()

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Noob question for Ruby on Rails- here's an example of my situation: If I
Ruby noob here! I have an array of structs that look like this Token
Kind of a ruby-noob active record query question: Magazine has_many :subscriptions User has_many :subscriptions
First of all you have to know I'm total Ruby noob :) I installed
This is basically a very noob question about Ruby console (IRB), but I couldn't
Ruby noob here. Any help with a little issue I'm having would be appreciated.
I'm sorry if this question is noob-ish but I'm not having much luck with
Ruby has two different exceptions mechanisms: Throw/Catch and Raise/Rescue. Why do we have two?
Okay this seems like a real noob question. I currently have a simple html
I am a noob in ruby on rails so excuse this question if it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.