Class: Dolphin::MessageBuilder::Base

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/dolphin/message_builder.rb

Direct Known Subclasses

Mail

Instance Method Summary collapse

Methods included from Util

#logger

Constructor Details

#initializeBase

Returns a new instance of Base.



41
42
# File 'lib/dolphin/message_builder.rb', line 41

def initialize
end

Instance Method Details

#buildObject

Raises:

  • (NotImplementedError)


44
45
46
# File 'lib/dolphin/message_builder.rb', line 44

def build
  raise NotImplementedError
end

#build_message(str, params) ⇒ Object



48
49
50
51
52
53
54
55
# File 'lib/dolphin/message_builder.rb', line 48

def build_message(str, params)
  begin
    template = TemplateBuilder.new
    template.build(str, params).encode("UTF-8")
  rescue SyntaxError => e
    logger :error, e
  end
end