Class: WebammToRails::Sources::Helpers::Devise::QrCodeHelper::Presenter

Inherits:
Object
  • Object
show all
Defined in:
lib/webamm_to_rails/sources/helpers/devise/qr_code_helper/presenter.rb

Instance Method Summary collapse

Instance Method Details

#renderObject



7
8
9
10
11
12
13
# File 'lib/webamm_to_rails/sources/helpers/devise/qr_code_helper/presenter.rb', line 7

def render
  template_path = File.expand_path('template.erb', __dir__)
  template_content = File.read(template_path)
  raw_content = ERB.new(template_content, trim_mode: '-').result(instance_eval { binding })

  ::WebammToRails::Utils::FormatCode.call(raw_content)
end