Class: WebammToRails::Sources::Helpers::Devise::Presenter
- Inherits:
-
Object
- Object
- WebammToRails::Sources::Helpers::Devise::Presenter
- Defined in:
- lib/webamm_to_rails/sources/helpers/devise/presenter.rb
Instance Method Summary collapse
- #collection ⇒ Object
-
#initialize(waml_definition:) ⇒ Presenter
constructor
A new instance of Presenter.
Constructor Details
#initialize(waml_definition:) ⇒ Presenter
Returns a new instance of Presenter.
8 9 10 |
# File 'lib/webamm_to_rails/sources/helpers/devise/presenter.rb', line 8 def initialize(waml_definition:) @waml_definition = waml_definition end |
Instance Method Details
#collection ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/webamm_to_rails/sources/helpers/devise/presenter.rb', line 12 def collection return [] if @waml_definition.authentication.blank? return [] unless @waml_definition.authentication.any? { |auth| auth.features.include?('two_factor_authentication') } [ { path: 'app/helpers/devise_qr_code_helper.rb', content: ::WebammToRails::Sources::Helpers::Devise::QrCodeHelper::Presenter.new.render } ] end |