Skip to content

Instantly share code, notes, and snippets.

View dotconde's full-sized avatar
😎

Deyvi Conde dotconde

😎
View GitHub Profile
@dotconde
dotconde / balancer.rb
Created November 27, 2021 04:02
String balancer
# frozen_string_literal: true
class Message
def initialize(content)
@content = content
end
def balanced?
return false unless allowed_string?(@content)
# HTTP status code to symbols for Rails 💎
# 1xx Informational
100 :continue
101 :switching_protocols
102 :processing
# 2xx Success
200 :ok
201 :created