Class: Slocks::ModalTemplateHandler

Inherits:
BlocksTemplateHandler show all
Defined in:
lib/slocks/template_handler.rb

Class Method Summary collapse

Methods inherited from BlocksTemplateHandler

handles_encoding?, preamble, translate_location

Class Method Details

.call(template, source = nil) ⇒ Object



64
65
66
67
68
69
70
71
72
73
74
# File 'lib/slocks/template_handler.rb', line 64

def call(template, source = nil)
  source ||= template.source
  "    @__slocks_modal_builder ||= Slocks::ModalBuilder.new(self)\n    def method_missing(m, *a, **k, &b);\n       @__slocks_modal_builder.respond_to?(m) ? @__slocks_modal_builder.public_send(m, *a, **k, &b) : super;\n    end\n    \#{source}\n    @__slocks_modal_builder.to_h\n  EOS\nend\n"

.default_format ⇒ Object



62
# File 'lib/slocks/template_handler.rb', line 62

def default_format = :slack_modal