Skip to content

Commit

Permalink
Ensure parameter names defined on interfaces, match the implementatio…
Browse files Browse the repository at this point in the history
…n (#188)
  • Loading branch information
Blacksmoke16 authored Jun 26, 2022
1 parent b2bf952 commit 533f49c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/formatter/null_style.cr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Athena::Console::Formatter::NullStyle
include Athena::Console::Formatter::OutputStyleInterface

# :inherit:
def foreground=(forground : Colorize::Color)
def foreground=(foreground : Colorize::Color)
end

# :inherit:
Expand Down
6 changes: 3 additions & 3 deletions src/formatter/output_style.cr
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ struct Athena::Console::Formatter::OutputStyle
end

# :inherit:
def foreground=(color : String)
if hex_value = color.lchop? '#'
def foreground=(foreground : String)
if hex_value = foreground.lchop? '#'
r, g, b = hex_value.hexbytes
return @foreground = Colorize::ColorRGB.new r, g, b
end

@foreground = Colorize::ColorANSI.parse color
@foreground = Colorize::ColorANSI.parse foreground
end

# :inherit:
Expand Down
2 changes: 1 addition & 1 deletion src/formatter/output_style_interface.cr
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ require "colorize"
# the text and have it open in your default browser. Otherwise, you will see it as regular text.
module Athena::Console::Formatter::OutputStyleInterface
# Sets the foreground color of `self`.
abstract def foreground=(forground : Colorize::Color)
abstract def foreground=(foreground : Colorize::Color)

# Sets the background color of `self`.
abstract def background=(background : Colorize::Color)
Expand Down
2 changes: 1 addition & 1 deletion src/output/console_output_interface.cr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Athena::Console::Output::ConsoleOutputInterface
abstract def error_output : ACON::Output::Interface

# Sets the `ACON::Output::Interface` that represents `STDERR`.
abstract def error_output=(error_output : ACON::Output::Interface) : Nil
abstract def error_output=(stderr : ACON::Output::Interface) : Nil

abstract def section : ACON::Output::Section
end

0 comments on commit 533f49c

Please sign in to comment.