Method: SourceTreeNode#initialize

Defined in:
ext/ae-editor/ae-editor.rb

#initialize(parent = nil, kind = 'class', sortable = true) {|_self| ... } ⇒ SourceTreeNode

Returns a new instance of SourceTreeNode.

Yields:

  • (_self)

Yield Parameters:



19
20
21
22
23
24
25
26
27
28
# File 'ext/ae-editor/ae-editor.rb', line 19

def initialize(parent=nil, kind='class', sortable=true)
  @sons = Array.new
  @parent = parent
  @kind = kind
  @sortable = sortable
  if @parent !=nil
    @parent.sons << self
  end
  yield(self) if block_given?
end