Skip to content

Commit

Permalink
Don't use these new and great features 😢
Browse files Browse the repository at this point in the history
  • Loading branch information
flori committed Jun 22, 2024
1 parent de5da7d commit 7902aa0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/term/ansicolor/attribute.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def initialize(name, code, options = {})
@name = name.to_sym
@background = !!options[:background]
@code = code.to_s
@direct = false
@true_color = false
if rgb = options[:true_color]
@true_color = true
Expand Down
4 changes: 2 additions & 2 deletions tests/attribute_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def test_true_color_gradient
)
assert_equal %w[
#00ffaf #1febaa #3ed7a5 #5dc3a0 #7caf9b #9b9b96 #ba8791 #d9738c #ff5f87
], g1.map { _1.rgb.html }
], g1.map { |c| c.rgb.html }
g2 = Attribute['#30ffaa'].gradient_to(
Attribute['#ff507f'],
steps: 9,
Expand All @@ -107,6 +107,6 @@ def test_true_color_gradient
)
assert_equal %w[
#00ffaf #1febaa #3ed7a5 #5dc3a0 #7caf9b #9b9b96 #ba8791 #d9738c #ff5f87
], g2.map { _1.rgb.html }
], g2.map { |c| c.rgb.html }
end
end

0 comments on commit 7902aa0

Please sign in to comment.