class ExceptionNotifier::HatoNotifier::Query
Public Class Methods
build(template, exception, options = {})
click to toggle source
# File lib/exception_notifier/hato_notifier.rb, line 65 def self.build(template, exception, options = {}) self.new(template, exception, options).build end
new(template, exception, options = {})
click to toggle source
# File lib/exception_notifier/hato_notifier.rb, line 55 def initialize(template, exception, options = {}) @exception = exception @options = options @template = template end
Public Instance Methods
build()
click to toggle source
# File lib/exception_notifier/hato_notifier.rb, line 61 def build expand_object(@template) end
Private Instance Methods
expand_object(obj)
click to toggle source
# File lib/exception_notifier/hato_notifier.rb, line 71 def expand_object(obj) case obj when Proc expand_proc(obj) else obj end end
expand_proc(prok)
click to toggle source
# File lib/exception_notifier/hato_notifier.rb, line 80 def expand_proc(prok) expand_object(prok.call(@exception, @options)) end