# This is an example toplevel class method. def self.example_toplevel_method_class_method end # This is an example toplevel instance method. def example_toplevel_method end # This is an example module. module ExampleModule # This is an example constant in a module. EXAMPLE_CONSTANT = "example constant in a module" # This is an example class method in a module. def self.example_class_method end # This is an example instance method in a module. def example_method end end # This is an example class. class ExampleClass # This is an example constant in a class. EXAMPLE_CONSTANT = "example constant in a class" # This is an example class method in a class. def self.example_class_method end # This is an example attribute. attr :example_attribute # This is an example attribute reader. attr_reader :example_attribute_reader # This is an example attribute writer. attr_writer :example_attribute_writer # This is an example attribute accessor. attr_accessor :example_attribute_accessor # This is an example instance method in a class. def example_method end end