Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion exercises/practice/accumulate/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Advanced
# Instructions append

## Advanced

It is typical to call [#to_enum][to_enum] when defining methods for a generic Enumerable, in case no block is passed.

Expand Down
2 changes: 2 additions & 0 deletions exercises/practice/anagram/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Instructions Append

## Implementation

You must return the anagrams in the same order as they are listed in the candidate words.
3 changes: 3 additions & 0 deletions exercises/practice/dnd-character/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Instructions Append

## Implementation

In this exercise you should define a `DndCharacter` class with:

- A static method for `modifier(constitution)`.
- Methods for `strength`, `dexterity`, `constitution`, `intelligence`, `wisdom`, `charisma`, and `hitpoints`
5 changes: 4 additions & 1 deletion exercises/practice/high-scores/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Instructions append

## Implementation

In this exercise you're going to instantiate a class and add some instance methods, you can refer to [Writing Classes in Ruby][writing-classes] for how to do this.

A HighScore accepts an array with one or more numbers, each representing one 'game score'. The Array class can offer inspiration for working with arrays, see [ruby-docs][ruby-docs-array].
A HighScore accepts an array with one or more numbers, each representing one 'game score'.
The Array class can offer inspiration for working with arrays, see [ruby-docs][ruby-docs-array].

[ruby-docs-array]: https://docs.ruby-lang.org/en/master/Array.html
[writing-classes]: http://ruby-for-beginners.rubymonstas.org/writing_classes/initializers.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Instructions append

## Implementation

The exercise requires you to write a class that provides a method for each child in the kindergarten.
You can make your work less repetitive (and more fun!) if, instead of manually defining 12 different methods, you use a bit of metaprogramming.
If you're not sure where to start, explore the `method_missing` or `define_method` methods.
4 changes: 3 additions & 1 deletion exercises/practice/leap/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Restrictions
# Instructions append

## Restrictions

Avoid using `Date#leap?` from the Standard Library.
6 changes: 4 additions & 2 deletions exercises/practice/ocr-numbers/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Instructions append

Some editors trim whitespace. If you rely on trailing whitespace in a multiline string,
instead use a format that doesn't rely on trailing whitespace, or adjust the settings in your editor.
## Implementation

Some editors trim whitespace.
If you rely on trailing whitespace in a multiline string, instead use a format that doesn't rely on trailing whitespace, or adjust the settings in your editor.

[A multiline string cheatsheet for ruby](https://commandercoriander.net/blog/2014/11/09/a-multiline-string-cheatsheet-for-ruby/)
6 changes: 2 additions & 4 deletions exercises/practice/robot-name/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Instructions append

## Implementation

In order to make this easier to test, your solution will need to implement a
`Robot.forget` method that clears any shared state that might exist to track
duplicate robot names.
In order to make this easier to test, your solution will need to implement a `Robot.forget` method that clears any shared state that might exist to track duplicate robot names.

Bonus points if this method does not need to do anything for your solution.

12 changes: 9 additions & 3 deletions exercises/practice/series/.docs/instructions.append.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Instructions append

In this exercise you're practicing iterating over an array, meaning: executing an operation on each element of an array. Ruby has many useful built-in methods for iterations. Take a look at [this article][how-to-iterate].
## Implementation

Most of the methods listed in the article are not methods specifically for Array, but come from [Enumerable][Enumerable]. The article doesn't list iterating over _consecutive elements_. The first challenge is to find a method that does.
In this exercise you're practicing iterating over an array, meaning: executing an operation on each element of an array.
Ruby has many useful built-in methods for iterations.
Take a look at [this article][how-to-iterate].

Most of the methods listed in the article are not methods specifically for Array, but come from [Enumerable][Enumerable].
The article doesn't list iterating over _consecutive elements_.
The first challenge is to find a method that does.

[Enumerable]: https://docs.ruby-lang.org/en/master/Enumerable.html
[how-to-iterate]: http://jeromedalbert.com/ruby-how-to-iterate-the-right-way/
[how-to-iterate]: http://jeromedalbert.com/ruby-how-to-iterate-the-right-way/