Skip to content

Commit

Permalink
Update documentation to reflect actual side effects (or lack thereof)
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzedge committed Feb 17, 2018
1 parent 1d820cd commit 43d7202
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 1.0.3 [compare][compare_v1_0_2_and_master]

- Update documentation to reflect actual side effects (or lack thereof) by [@gonzedge][github_user_gonzedge]
- Add `#concat` method to public facing API by [@gonzedge][github_user_gonzedge]
- Rename a few tests to maintain consistent wording by [@gonzedge][github_user_gonzedge]
- Add `#add_word` and `#add_words` helpers to avoid shotgun surgery in tests by [@gonzedge][github_user_gonzedge]
Expand Down
3 changes: 1 addition & 2 deletions lib/rambling/trie/container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ def initialize root, compressor
yield self if block_given?
end

# Adds a word to the trie, without altering the passed word.
# Adds a word to the trie.
# @param [String] word the word to add the branch from.
# @return [Nodes::Node] the just added branch's root node.
# @raise [InvalidOperation] if the trie is already compressed.
# @see Nodes::Raw#add
# @see Nodes::Compressed#add
# @note Avoids altering the contents of the word variable.
def add word
root.add char_symbols word
end
Expand Down
2 changes: 1 addition & 1 deletion lib/rambling/trie/nodes/raw.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Raw < Rambling::Trie::Nodes::Node
# Adds a word to the current raw (uncompressed) trie node.
# @param [Array<Symbol>] chars the char array to add to the trie.
# @return [Raw] the added/modified node based on the word added.
# @note This method clears the contents of the word variable.
# @note This method clears the contents of the chars variable.
def add chars
if chars.empty?
terminal!
Expand Down

0 comments on commit 43d7202

Please sign in to comment.