Create a superhero class with the following attributes:
name
strength
*agility
*intelligence
*
You should be able to compare different superheroes based on the avarage of attributes marked with *
Display the list of superheroes sorted by an average, as well as by each of the attributes marked with *
You can't deal with everything on your own, that's why a superhero needs a Team.
Implement a Team class which acts as a collection of superheroes so that you can call Enumerable
methods on it
Anticipate a situation where no block is provided
Also, create your own enumerable module which implements following methods:
select
reduce
maxmin
Construct an infinite list enumerator which would return first n
sqaured values(1 < n < 10_000
)
Think about an elegant way to implement following methods:
each_with_object
[Note: Yes, I know it's present in the Enumerable. We'd like to see an alternative implementation via different enumerators]map_cons
reverse_cycle_map
[Note: without usingArray#reverse
method]
Read about Fiber
Each task has to include RSpec tests