我很难使用 .match 仅允许和阻止选择性推文并仅显示来自“does_match?”的推文
def does_match?
allow = "/orange|grape\sfruit|apple/"
block = "/@fruits|coconut/"
allowfruits = "/berry|mango/"
@tweet.match(allow).nil?
@tweet.match(block)
@tweet.match(allowfruits) if @user =~ /\A(twitteruser|anotheraccount)\Z/
@tweet.match(/@[A-Za-z0-9_:-]+/)
return @tweet
end
def show
return @tweet
end