Class: MarkdownExpander::Expander::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/markdown_expander/expander.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent, value) ⇒ Node

Returns a new instance of Node.



63
64
65
66
67
# File 'lib/markdown_expander/expander.rb', line 63

def initialize parent, value
  @parent = parent
  @value = value
  @children = []
end

Instance Attribute Details

#childrenObject

Returns the value of attribute children.



61
62
63
# File 'lib/markdown_expander/expander.rb', line 61

def children
  @children
end

#parentObject

Returns the value of attribute parent.



60
61
62
# File 'lib/markdown_expander/expander.rb', line 60

def parent
  @parent
end

#valueObject

Returns the value of attribute value.



62
63
64
# File 'lib/markdown_expander/expander.rb', line 62

def value
  @value
end