Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing documentation. #330

Merged
merged 1 commit into from
Aug 20, 2024
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
1 change: 1 addition & 0 deletions app/services/commands/alias/add/invalid_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class InvalidCommand < Result

# Initialize an alias add invalid command result.
#
# @param [String] command The invalid command name.
# @return [void]
def initialize(command:)
@command = command
Expand Down
3 changes: 3 additions & 0 deletions app/services/commands/alias/add/success.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ class Success < Result

# Initialize an alias add success result.
#
# @param [Character] character The character adding the alias.
# @param [String] command The command name.
# @param [String] shortcut The shortcut string.
# @return [void]
def initialize(character:, command:, shortcut:)
@character = character
Expand Down
1 change: 1 addition & 0 deletions app/services/commands/alias/list/success.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class Success < Result

# Initialize an alias list result.
#
# @param [Character] character The character listing the aliases.
# @return [void]
def initialize(character:)
@character = character
Expand Down
2 changes: 2 additions & 0 deletions app/services/commands/alias/remove/success.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class Success < Result

# Initialize a successful alias remove result.
#
# @param [Character] character The character removing the alias.
# @param [String] name The alias name to remove.
# @return [void]
def initialize(character:, name:)
@character = character
Expand Down
1 change: 1 addition & 0 deletions app/services/commands/alias/remove/unknown_alias.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class UnknownAlias < Result

# Initialize an unknown alias remove result.
#
# @param [String] name The invalid alias name.
# @return [void]
def initialize(name:)
@name = name
Expand Down
1 change: 1 addition & 0 deletions app/services/commands/alias/show/success.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class Success < Result

# Initialize a successful alias show result.
#
# @param [Array] aliases An array of a single alias being shown.
# @return [void]
def initialize(aliases:)
@aliases = aliases
Expand Down
1 change: 1 addition & 0 deletions app/services/commands/alias/show/unknown_alias.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class UnknownAlias < Result

# Initialize an unknown alias show result.
#
# @param [String] name The unknown alias name.
# @return [void]
def initialize(name:)
@name = name
Expand Down
3 changes: 3 additions & 0 deletions app/services/commands/attack/hit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ class Hit < Result

# Initialize a successful attack hit result.
#
# @param [Character] character The character hitting the target.
# @param [Integer] damage The damage dealt to the target.
# @param [Monster] target The target being attacked.
# @return [void]
def initialize(character:, damage:, target:)
@character = character
Expand Down
1 change: 1 addition & 0 deletions app/services/commands/attack/invalid_target.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class InvalidTarget < Result

# Initialize an attack invalid target result.
#
# @param [String] target_name The name of the invalid target.
# @return [void]
def initialize(target_name:)
@target_name = target_name
Expand Down
3 changes: 3 additions & 0 deletions app/services/commands/attack/killed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ class Killed < Result

# Initialize an attack killed result.
#
# @param [Character] character The character killing the target.
# @param [Integer] damage The damage dealt to the target.
# @param [Monster] target The target being killed.
# @return [void]
def initialize(character:, damage:, target:)
@character = character
Expand Down
2 changes: 2 additions & 0 deletions app/services/commands/attack/missed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class Missed < Result

# Initialize a missed attack result.
#
# @param [Character] character The character missing the target.
# @param [Monster] target The target being missed.
# @return [void]
def initialize(character:, target:)
@character = character
Expand Down
1 change: 1 addition & 0 deletions app/services/commands/direct/missing_target.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class MissingTarget < Result

# Initialize a missing target direct message result.
#
# @param [String] target_name The missing target name.
# @return [void]
def initialize(target_name:)
@target_name = target_name
Expand Down
3 changes: 3 additions & 0 deletions app/services/commands/direct/success.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ class Success < Result

# Initialize a successful direct message result.
#
# @param [Character] character The character messaging the target.
# @param [String] message The message being directed to the target.
# @param [Character] target The target being messaged.
# @return [void]
def initialize(character:, message:, target:)
@character = character
Expand Down
2 changes: 2 additions & 0 deletions app/services/commands/emote/success.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ class Success < Result

# Initialize a successful emote result.
#
# @param [Character] character The character emoting.
# @param [String] message The message being emoted.
# @return [void]
def initialize(character:, message:)
@character = character
Expand Down
1 change: 1 addition & 0 deletions app/services/commands/help/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class Command < Result

# Initialize a help command result.
#
# @param [String] name The name of the command for help.
# @return [void]
def initialize(name:)
@name = name
Expand Down
1 change: 1 addition & 0 deletions app/services/commands/help/invalid_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class InvalidCommand < Result

# Initialize a help invalid command result.
#
# @param [String] name The invalid command name.
# @return [void]
def initialize(name:)
@name = name
Expand Down
2 changes: 2 additions & 0 deletions app/services/commands/look/success.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class Success < Result

# Initialize a successful look result.
#
# @param [Character] character The character looking at the object.
# @param [String] object The optional object to look at.
# @return [void]
def initialize(character:, object:)
@character = character
Expand Down
1 change: 1 addition & 0 deletions app/services/commands/move/empty_direction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class EmptyDirection < Result

# Initialize an empty direction move result.
#
# @param [String] direction The empty direction.
# @return [void]
def initialize(direction:)
@direction = direction
Expand Down
4 changes: 4 additions & 0 deletions app/services/commands/move/success.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ class Success < Result

# Initialize a successful move result.
#
# @param [Character] character The character moving.
# @param [String] direction The direction the character is moving.
# @param [Room] room_source The room the character is moving from.
# @param [Room] room_target The room the character is moving to.
# @return [void]
def initialize(character:, direction:, room_source:, room_target:)
@character = character
Expand Down
2 changes: 2 additions & 0 deletions app/services/commands/say/success.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class Success < Result

# Initialize a successful say result.
#
# @param [Character] character The character speaking.
# @param [String] message The message being spoken.
# @return [void]
def initialize(character:, message:)
@character = character
Expand Down
1 change: 1 addition & 0 deletions app/services/commands/unknown/success.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class Success < Result

# Initialize a successful unknown result.
#
# @param [String] command The unknown command name.
# @return [void]
def initialize(command:)
@command = command
Expand Down
1 change: 1 addition & 0 deletions app/services/commands/whisper/missing_target.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class MissingTarget < Result

# Initialize a missing target whisper result.
#
# @param [Character] target The missing target.
# @return [void]
def initialize(target:)
@target = target
Expand Down
3 changes: 3 additions & 0 deletions app/services/commands/whisper/success.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ class Success < Result

# Initialize a successful whisper result.
#
# @param [Character] character The character whispering.
# @param [String] message The message being whispered.
# @param [Character] target The target being whispered to.
# @return [void]
def initialize(character:, message:, target:)
@character = character
Expand Down
1 change: 1 addition & 0 deletions app/services/monsters/attack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class Attack
# Initialize an instance.
#
# @param [Monster] monster The monster performing the attack.
# @return [void]
def initialize(monster)
@monster = monster
end
Expand Down