0
임 : 선택적인 트윗을 허용 및 차단하고 'does_match?'에서만 표시하는 데 어려움을 겪고 있습니다.Ruby 정규식 선택 트위스트
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
어떤 문제가 있습니까? 데이터 입/출력은 어떤 모습입니까? – squiguy
순간에는 출력이 입력과 동일합니다 – drewsdesign