Skip to content

Instantly share code, notes, and snippets.

@kohigh
Created January 3, 2019 17:49
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 kohigh/e84230eb9f9156b069a2d3143c9d6a64 to your computer and use it in GitHub Desktop.
Save kohigh/e84230eb9f9156b069a2d3143c9d6a64 to your computer and use it in GitHub Desktop.
class for SMS objects
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