I want to add "*" to the object. So I was thinking to do something like
def initialize(search:)
@search = search + "*"
end
it works but I think this is not quite elegant way to do it. What is the better, more efficient way?
The The Ruby Style Guide says these are ok:
@search = "#{search}*"
or
@search = format('%s%s', search, "*")
@search = "#{search} *"that can works*?*when actually executing the search.