class Controll::Notify::Message

Attributes

options[R]
text[R]

Private Class Methods

new(text, options = {}) click to toggle source
# File lib/controll/notify/message.rb, line 9
def initialize text, options = {}
  raise ArgumentError, "Message text must be a String or Symbol" unless valid_text? text
  @text    = text
  @options = options
end

Private Instance Methods

translate?() click to toggle source
# File lib/controll/notify/message.rb, line 15
def translate?
  text.kind_of? Symbol
end
valid_text?(text) click to toggle source
# File lib/controll/notify/message.rb, line 21
def valid_text? text
  text.kind_of?(String) || text.kind_of?(Symbol)
end