Getting a List of Methods in Ruby
To get a list of methods that a specific object or module has in Ruby, do it as follows:
# Load necessary library
require 'csv'
# Get list of CSV module methods (excluding inherited methods)
p CSV.methods(false)
#=> [:read, :open, :readlines, :foreach, :parse, :table, :instance, :filter, :generate, :generate_line, :parse_line]
# Get list of YAML module methods (excluding inherited methods)
p YAML.methods(false)
#=> [:load, :dump, :add_domain_type, :add_builtin_type, :tag_class, :tagurize, :object_maker, :quick_emit, :add_ruby_type, :read_type_class, :transfer]
This allows you to check what methods the specified object or module has.