Class: Captchah::Generators::Html
- Inherits:
-
Object
- Object
- Captchah::Generators::Html
- Defined in:
- lib/captchah/generators/html.rb
Constant Summary collapse
- ATTR_NAMES =
%i[ id puzzle width action_label truth_payload reload_payload reload_label reload css csp_nonce required ].freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args) ⇒ Html
constructor
A new instance of Html.
Constructor Details
#initialize(args) ⇒ Html
Returns a new instance of Html.
24 25 26 27 28 |
# File 'lib/captchah/generators/html.rb', line 24 def initialize(args) ATTR_NAMES.each do |attr_name| instance_variable_set("@#{attr_name}", args[attr_name]) end end |
Class Method Details
.call(*args) ⇒ Object
20 21 22 |
# File 'lib/captchah/generators/html.rb', line 20 def self.call(*args) new(*args).send(:call) end |