Method: Xdt::Section#initialize

Defined in:
lib/xdt/xdt_sections.rb

#initialize(type) {|_self| ... } ⇒ Section

Returns a new instance of Section.

Yields:

  • (_self)

Yield Parameters:

  • _self (Xdt::Section)

    the object that the method was called on



38
39
40
41
42
# File 'lib/xdt/xdt_sections.rb', line 38

def initialize(type)
  @type = type
  @fields = []
  yield self if block_given?
end