The Ruby Zone: Live Ruby Examples, Exercises & Projects
- Append and Concatenation
- Array Assign
- Array Compare
- Array Copy
- Array Index
- Compare the array length
- Array Methods
- Array Sorting
- Array Getting Started
- Creating Arrays
- Comparisons Module
- Flatten and Compact
- Hash Methods
- Treating Hashes as Arrays
- Hash Order
- Sorting Hash
- Creating Hashes
- Copying a Hash
- Multidimensional Array
- MultiArray
- Append and Concatenation
- While Modifiers
- Loop Executes at least Once
- Using Loop
- Loops on Arrays
- Blocks
- Using Each Loop
- Using Enum
- Enumerator
- Custom Comparison
- For Each
- compare for loops and each iterators with arrays and ranges
- For Loop
- Simple For Loop
- include Enumerable
- Enumerable methods with your MyCollection objects
- Enumerator with Hash
- Create An Array Using Two Sub-arrays
- Using Until
- Using Upto and Downto
- While Modifiers
- and or
- Wrong Use of and or
- Boolean Operators
- Case Statement
- Case Break
- More on Case
- Case with Strings
- Alternative Case Syntax
- Catch and Throw
- Constants
- and or not
- Eccentricities of Boolean Operators
- if else
- if else alternative
- Working with if else if
- More with if else if
- if-then
- if unless Modifiers
- Universal Constant
- Negation
- Unless
- and or
- Method Names
- Nested Methods
- Nested Methods Scope
- Overriding Methods
- Cannot Access Private Member Outside the Scope
- Singleton Classes
- Singleton Class
- Singleton Method
- Class_hierarchy
- Class Methods
- Instance Variables
- SINGLETON CLASS METHODS
- WHAT ARE CLASS METHODS FOR?
- Instant Variables
- Ruby Constructor New
- Protected
- Public Protected and Private Access Specifiers
- Singleton Method1
- Singleton Method2
- Method Names
- Argument Passing
- Assignment Reference
- Assignment
- Concatenation Without Using New Object
- Default Arguments
- Tests for equality: == or equal?
- Information Hiding
- When are 2 Objects Identical?
- Method Call Itself
- Instance Methods
- Information NotHiding
- Integer Object ID's
- Parentheses Avoid Ambiguity
- Returning Multiple Values
- Returning Values
- Breaking Encapsulation
- String Reverse
- Parameter Passing
- Information NotHidding2
- Parallel Assignment
- Argument Passing
- Alias Methods
- Comparable Module
- Name Conflicts
- Extending Objects
- Instance Class Variables
- Math
- Module Variables
- Module Function
- Modules_classes
- Modules as Namespaces
- INCLUDED MODULES OR ‘MIXINS’
- Modules3
- Modules4
- Mix-In With Care
- Scope Resolution Operator
- Simple Module
- Test
- Module Instance
- Test Module
- Alias Methods
- Match Data
- Match Groups
- String Method Match Scan
- Matchdata
- Pre Match and Post Match
- Making Matches Regex1
- Matching Data Complex Pattern
- Greedy Matching
- Greedy Matching2
- Match Groups
- Test a Match
- Regular Expression Overview
- Making Matches
- Making Matches Regex2
- Specific Data Only
- Match a String
- String Operator
- Match Data
- Binding
- Binding2
- Understanding Binding
- Freezing Objects
- Adding Variables and Methods
- Creating Classes at Runtime
- Dynamic
- Eval Magic
- Eval String
- Eval3
- Special Eval :- Instance_eval
- Special Eval:- Module_eval
- Handling Missing Method1
- Handling Missing Method2
- Remove Methods
- Remove Methods2
- Send
- Special Eval:- Str_eval
- Writing Program at Run Time
- Binding
-
Say Hello to....110votesBy adminguy -
Introduction1votesBy CodeMaster -
Working with variables1votesBy CodeMaster -
Constants vs Variables1votesBy CodeMaster
-
-
Ternary Operator76votesBy adminguy -
Ruby Arithmetic Operators1votesBy CodeMaster -
Logical Operators1votesBy CodeMaster -
Range operators1votesBy CodeMaster
-
-
Print "dog" in different languages218votesBy adminguy -
Case Statement1votesBy adminguy -
if else statements1votesBy CodeMaster -
unless statement1votesBy CodeMaster -
Trueness of objects in Ruby1votesBy CodeMaster
-
-
While Loop Example290votesBy adminguy -
MultiplicationTable using for211votesBy adminguy -
Print numbers till 546votesBy adminguy -
while Statement1votesBy CodeMaster -
until Statement1votesBy CodeMaster
-
-
Inserting a String in a String396votesBy adminguy -
gsub method315votesBy adminguy -
Default Arguments299votesBy adminguy -
Variable Arguments62votesBy adminguy -
Reverse array elements38votesBy adminguy -
delete and delete! methods33votesBy adminguy -
Method returning BOOLEAN24votesBy adminguy
-
-
Accessing Elements of Array374votesBy adminguy -
Array Declaration359votesBy adminguy -
Clear all array elelments356votesBy adminguy -
Sort an array351votesBy adminguy -
Delete an array element282votesBy adminguy -
Intersection of arrays192votesBy adminguy -
Difference of arrays192votesBy adminguy -
Insert a value in an array183votesBy adminguy -
Comparing Arrays176votesBy adminguy -
Check if element exists in an array150votesBy adminguy -
Concat125votesBy adminguy -
Indexing in arrays113votesBy adminguy -
Union of arrays102votesBy adminguy -
Concatenate arrays92votesBy adminguy -
Compare arrays using <=>23votesBy adminguy
-
-
Exam Result317votesBy CodeMaster
-
-
case statement practice366votesBy CodeMaster -
if else statements practice347votesBy CodeMaster
-
-
Highest Power of 2333votesBy CodeMaster -
Sum of first n integers--Looping Practice218votesBy CodeMaster
-
Ruby Projects
User login
Add an example to this zone.
Takes < 5 mins!
Top Scorers This week



Run It Now!






