Class: PasswordRequired::PasswordRequest::HiddenInputs
- Inherits:
-
Object
- Object
- PasswordRequired::PasswordRequest::HiddenInputs
- Includes:
- ActionView::Helpers::FormTagHelper
- Defined in:
- lib/password_required/password_request/hidden_inputs.rb
Instance Attribute Summary collapse
-
#namespaces ⇒ Object
readonly
Returns the value of attribute namespaces.
Instance Method Summary collapse
-
#initialize(params, namespaces: []) ⇒ HiddenInputs
constructor
A new instance of HiddenInputs.
- #to_s ⇒ Object
Constructor Details
#initialize(params, namespaces: []) ⇒ HiddenInputs
Returns a new instance of HiddenInputs.
8 9 10 11 |
# File 'lib/password_required/password_request/hidden_inputs.rb', line 8 def initialize(params, namespaces: []) @params = params @namespaces = namespaces end |
Instance Attribute Details
#namespaces ⇒ Object (readonly)
Returns the value of attribute namespaces.
6 7 8 |
# File 'lib/password_required/password_request/hidden_inputs.rb', line 6 def namespaces @namespaces end |
Instance Method Details
#to_s ⇒ Object
13 14 15 16 17 |
# File 'lib/password_required/password_request/hidden_inputs.rb', line 13 def to_s @params.reduce('') do |input_html, key_value_pair| input_html + input_from(*key_value_pair) end end |