Class: Formation::Types::Password

Inherits:
Object
  • Object
show all
Defined in:
lib/formation/types/password.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#fieldObject (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_htmlObject



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