Class: LDIF::DSL::ContentBuilder
- Inherits:
-
Object
- Object
- LDIF::DSL::ContentBuilder
- Defined in:
- lib/ldif/dsl/content_builder.rb
Instance Method Summary collapse
- #build ⇒ Object
- #group(&block) ⇒ Object
-
#initialize ⇒ ContentBuilder
constructor
A new instance of ContentBuilder.
- #person(&block) ⇒ Object
Constructor Details
#initialize ⇒ ContentBuilder
Returns a new instance of ContentBuilder.
8 9 10 11 |
# File 'lib/ldif/dsl/content_builder.rb', line 8 def initialize @groups = [] @people = [] end |
Instance Method Details
#build ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/ldif/dsl/content_builder.rb', line 23 def build billet = "version: 1\n\n" billet << organizational_unit('people') billet << "\n" billet << organizational_unit('groups') billet << "\n" billet << @groups.join("\n") billet << "\n" billet << @people.join("\n") end |