Sha256: a1ac79f6647f3c4ef2ed32fb05976a677e9492b5828fcf5e857fecdf306c8228
Contents?: true
Size: 616 Bytes
Versions: 3
Compression:
Stored size: 616 Bytes
Contents
module Controll::Notify class Message autoload :Translator, 'controll/notify/message/translator' autoload :Handler, 'controll/notify/message/handler' autoload :Resolver, 'controll/notify/message/resolver' attr_reader :text, :options def initialize text, options = {} raise ArgumentError, "Message text must be a String or Symbol" unless valid_text? text @text = text @options = options end def translate? text.kind_of? Symbol end protected def valid_text? text text.kind_of?(String) || text.kind_of?(Symbol) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
controll-0.3.2 | lib/controll/notify/message.rb |
controll-0.3.1 | lib/controll/notify/message.rb |
controll-0.3.0 | lib/controll/notify/message.rb |