Showing posts with label classes. Show all posts
Showing posts with label classes. Show all posts

Tuesday, 12 July 2016

Implement a Hash With Indifferent Access

Difficulty:
Easy

Tags:
hashes, classes

Instructions:
Implement a hash class which does not distinguish between symbols and strings for its keys.

Problem and Solution:

Architecting a Solution

Difficulty:
Easy

Tags:
structs, classes

Instructions:
Use a Struct to define an Architect class.

Hidden Code:
There is hidden code with assertions that is also being run to test out your code.

Problem and Solution:

Fixing Bad Code the Wrong Way

Difficulty:
Easy

Tags:
method_missing, classes

Instructions:
Your coworker did a bad job defining a class. Fix it for him using #method_missing.

Problem and Solution:

Including Modules

Difficulty:
Easy

Tags:
classes, modules

Instructions:
modules are great concept for multiple inheritance

Problem and Solution: