Method: CSL::Node#initialize

Defined in:
lib/csl/node.rb

#initialize(attributes = {}) {|_self| ... } ⇒ Node

Returns a new instance of Node.

Yields:

  • (_self)

Yield Parameters:

  • _self (CSL::Node)

    the object that the method was called on



229
230
231
232
233
234
# File 'lib/csl/node.rb', line 229

def initialize(attributes = {})
  @attributes = self.class.create_attributes(attributes)
  @children = self.class.create_children

  yield self if block_given?
end