Class: LDIF::DSL::Person::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/ldif/dsl/person.rb

Instance Method Summary collapse

Instance Method Details

#buildObject



35
36
37
# File 'lib/ldif/dsl/person.rb', line 35

def build
  Person.new(@first_name, @second_name, @password)
end

#first_name(first_name) ⇒ Object



20
21
22
23
# File 'lib/ldif/dsl/person.rb', line 20

def first_name(first_name)
  @first_name = first_name
  self
end

#password(plain_password) ⇒ Object



30
31
32
33
# File 'lib/ldif/dsl/person.rb', line 30

def password(plain_password)
  @password = "{SHA}#{Digest::SHA1.base64digest(plain_password)}"
  self
end

#second_name(second_name) ⇒ Object



25
26
27
28
# File 'lib/ldif/dsl/person.rb', line 25

def second_name(second_name)
  @second_name = second_name
  self
end