Skip to content

Instantly share code, notes, and snippets.

@MaryKuz
Created January 3, 2019 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaryKuz/db827f1d23ebd02fd4dc42a2a454ad55 to your computer and use it in GitHub Desktop.
Save MaryKuz/db827f1d23ebd02fd4dc42a2a454ad55 to your computer and use it in GitHub Desktop.
class SMS
attr_reader :phone
def self.configure(texts:, **args)
const_set('TEXTS', texts)
end
def initialize(type:, phone:, **attrs)
@type = type
@phone = phone
@attrs = attrs
end
def to_s
TEXTS[@type] % @attrs
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment