Class: SnowyOwl::Plays::PlotNodeHash
- Inherits:
-
Object
- Object
- SnowyOwl::Plays::PlotNodeHash
- Defined in:
- lib/snowy_owl/plays.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#digest ⇒ Object
Returns the value of attribute digest.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parent ⇒ Object
Returns the value of attribute parent.
Instance Method Summary collapse
- #append_child(digest) ⇒ Object
-
#initialize ⇒ PlotNodeHash
constructor
A new instance of PlotNodeHash.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ PlotNodeHash
Returns a new instance of PlotNodeHash.
6 7 8 |
# File 'lib/snowy_owl/plays.rb', line 6 def initialize @children = [] end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
4 5 6 |
# File 'lib/snowy_owl/plays.rb', line 4 def children @children end |
#digest ⇒ Object
Returns the value of attribute digest.
4 5 6 |
# File 'lib/snowy_owl/plays.rb', line 4 def digest @digest end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/snowy_owl/plays.rb', line 4 def name @name end |
#parent ⇒ Object
Returns the value of attribute parent.
4 5 6 |
# File 'lib/snowy_owl/plays.rb', line 4 def parent @parent end |
Instance Method Details
#append_child(digest) ⇒ Object
10 11 12 |
# File 'lib/snowy_owl/plays.rb', line 10 def append_child(digest) @children << digest end |
#to_h ⇒ Object
14 15 16 17 18 |
# File 'lib/snowy_owl/plays.rb', line 14 def to_h {'digest' => @digest, 'parent' => @parent, 'plot_name' => @name } end |