Class: Formation::Types::Password
- Inherits:
-
Object
- Object
- Formation::Types::Password
- Defined in:
- lib/formation/types/password.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
readonly
Returns the value of attribute field.
Instance Method Summary collapse
-
#initialize(field) ⇒ Password
constructor
A new instance of Password.
- #to_html ⇒ Object
Constructor Details
#initialize(field) ⇒ Password
Returns a new instance of Password.
5 6 7 |
# File 'lib/formation/types/password.rb', line 5 def initialize(field) @field = field end |
Instance Attribute Details
#field ⇒ Object (readonly)
Returns the value of attribute field.
3 4 5 |
# File 'lib/formation/types/password.rb', line 3 def field @field end |
Instance Method Details
#to_html ⇒ Object
9 10 11 12 13 |
# File 'lib/formation/types/password.rb', line 9 def to_html <<-HTML.strip <input type="password" name="#{field.name}" /> HTML end |