Class: SnowyOwl::Plays::PlotNodeHash

Inherits:
Object
  • Object
show all
Defined in:
lib/snowy_owl/plays.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePlotNodeHash

Returns a new instance of PlotNodeHash.



6
7
8
# File 'lib/snowy_owl/plays.rb', line 6

def initialize
  @children = []
end

Instance Attribute Details

#childrenObject

Returns the value of attribute children.



4
5
6
# File 'lib/snowy_owl/plays.rb', line 4

def children
  @children
end

#digestObject

Returns the value of attribute digest.



4
5
6
# File 'lib/snowy_owl/plays.rb', line 4

def digest
  @digest
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/snowy_owl/plays.rb', line 4

def name
  @name
end

#parentObject

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_hObject



14
15
16
17
18
# File 'lib/snowy_owl/plays.rb', line 14

def to_h
  {'digest' => @digest,
   'parent' => @parent,
   'plot_name' => @name }
end