Class: XRT::Statement::Document
Instance Method Summary
collapse
#==, #auto_indent, #contains_directive?, #depth, #find_block_texts, #find_blocks, #find_blocks_with_directive, #include?, #replace_child, #statements, #to_s
Constructor Details
Returns a new instance of Document.
101
102
103
|
# File 'lib/xrt/statement.rb', line 101
def initialize
@children = []
end
|
Instance Method Details
#<<(statement) ⇒ Object
105
106
107
|
# File 'lib/xrt/statement.rb', line 105
def << statement
@children << statement
end
|
#children ⇒ Object
109
110
111
|
# File 'lib/xrt/statement.rb', line 109
def children
@children
end
|
#content ⇒ Object
113
114
115
|
# File 'lib/xrt/statement.rb', line 113
def content
children.map{|c| c.content }.join
end
|
#inspect ⇒ Object
117
118
119
|
# File 'lib/xrt/statement.rb', line 117
def inspect
"(#{self.class}:#{self.children})"
end
|