Skip to content

Commit

Permalink
Ruby 3.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
crazymanish committed Jul 29, 2021
1 parent 96004b4 commit 54b0af0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ class SlackBotLinkFormatterHelper

class << self
def format string, opts={}
SlackBotLinkFormatterHelper.new(string, opts).formatted
SlackBotLinkFormatterHelper.new(string, **opts).formatted
end
end

attr_reader :formats

def initialize string, formats: %i[html markdown]
@formats = formats
def initialize string, opts = {}
@formats = opts[:formats] || %i[html markdown]
@orig = string.respond_to?(:scrub) ? string.scrub : string
end

Expand Down

0 comments on commit 54b0af0

Please sign in to comment.