Class: C::NodeList

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

Overview

Modify the NodeArray and NodeChain lists to output correct code when printed to a file.

Instance Method Summary collapse

Instance Method Details

#to_sObject

Modify the ‘to_s’ method to output correct code when printed to a file. Originally, it would separate instances of the list with a ‘,’. Instead, a newline command is added.



28
29
30
# File 'lib/castaddon.rb', line 28

def to_s
  self.join("\n")
end