Skip to content

Instantly share code, notes, and snippets.

@donkastello

donkastello/sms.rb

Created Jan 3, 2019
Embed
What would you like to do?
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