Class: WebammToRails::Sources::Views::Devise::Otp::Presenter

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

Instance Method Summary collapse

Instance Method Details

#collectionObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/webamm_to_rails/sources/views/devise/otp/presenter.rb', line 7

def collection
  base_path = "app/views/devise/"
  templates = [
    'otp_credentials/show.html.erb',
    'otp_credentials/refresh.html.erb',
    'otp_tokens/_token_secret.html.erb',
    'otp_tokens/_trusted_devices.html.erb',
    'otp_tokens/edit.html.erb',
    'otp_tokens/recovery_codes.html.erb',
    'otp_tokens/recovery.html.erb',
    'otp_tokens/show.html.erb'
  ]

  templates.map do |template|
    {
      path: base_path + template,
      content: File.read(File.expand_path("templates/#{template}", __dir__))
    }
  end
end