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

  • Home
  • SEARCH
  • 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 8737117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:26:33+00:00 2026-06-13T10:26:33+00:00

Is there a way to see the class specific methods available to an instance

  • 0

Is there a way to see the class specific methods available to an instance through IRB?

I made an instance of the URI class, and then pressed Tab to see what methods I can use, however I see about 100 possibilities:

  1.9.3p286 :001 > require 'uri'
=> true

1.9.3p286 :002 > uri = URI('http://game.dl.a-steroids.com/TrafficServer/')
=> #<URI::HTTP:0x00000000eae390 URL:http://game.dl.a-steroids.com/TrafficServer/>

  1.9.3p286 :008 > uri.
  Display all 102 possibilities? (y or n)

I want to filter only the specific methods for that instance, such as the ones described here: http://www.ruby-doc.org/stdlib-1.9.3/libdoc/uri/rdoc/URI.html or below:

  1.9.3p286 :003 > uri.host
=> "game.dl.a-steroids.com"

1.9.3p286 :006 > uri.path
=> "/TrafficServer/"

1.9.3p286 :007 > uri.scheme
=> "http"
  • 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-13T10:26:35+00:00Added an answer on June 13, 2026 at 10:26 am

    URI is a module. It cannot have an instance and it does not have instance methods. To see the module methods directly defined on URI, do:

    URI.methods(false)
    

    # => [:scheme_list, :split, :parse, :join, :extract, :regexp,
    :encode_www_form_component, :decode_www_form_component,
    :encode_www_form, :decode_www_form]

    And what URI(...) creates is an instance of URI:HTTP. To see the instance methods directly defined on URI::HTTP, do this:

    URI::HTTP.instance_methods(false)
    

    # => [:request_uri]


    If this seems too narrow, you can step up to a superclass. URI classes are based on URI::Generic,

    URI::HTTP.superclass
    

    # => URI::Generic

    so do the same with it:

    URI::Generic.instance_methods(false)
    

    #=> [:default_port, :scheme, :host, :port, :registry, :path, :query, :opaque, :fragment, :parser, :component, :set_scheme, :scheme=,
    :userinfo=, :user=, :password=, :set_userinfo, :set_user,
    :set_password, :userinfo, :user, :password, :set_host, :host=,
    :hostname, :hostname=, :set_port, :port=, :set_registry, :registry=,
    :set_path, :path=, :set_query, :query=, :set_opaque, :opaque=,
    :set_fragment, :fragment=, :hierarchical?, :absolute?, :absolute,
    :relative?, :merge!, :merge, :+, :route_from, :-, :route_to,
    :normalize, :normalize!, :to_s, :==, :hash, :eql?, :component_ary,
    :select, :inspect, :coerce]

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

Sidebar

Related Questions

Is there a way to see if assets file changed between application reinstall in
Is there any way to see exact results of an executed update statement in
Is there a way to see what's been saved to NSUserDefaults directly? I'd like
Is there a way to see how many items in a dictionary share the
Is there any way to see what a control will look like in the
Is there a way to see how many context switches each thread generates? (both
Is there a way to see users that have certain security role assigned? I'm
Is there a way to see the messages that RIA services/clients send?
Is there any way to see how many queries are executed in like every
Using Microsoft SQL Server 2005, is there any way to see when a table

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.