Class: Sablon::Processor::Document::InlineParagraphBlock
- Inherits:
-
Block
- Object
- Block
- Sablon::Processor::Document::InlineParagraphBlock
show all
- Defined in:
- lib/sablon/processor/document/blocks.rb
Instance Attribute Summary
Attributes inherited from Block
#end_field, #start_field
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Block
#body, enclosed_by, #initialize, parent, parent_selector, #process, #replace
Class Method Details
.encloses?(start_field, end_field) ⇒ Boolean
125
126
127
|
# File 'lib/sablon/processor/document/blocks.rb', line 125
def self.encloses?(start_field, end_field)
super && parent(start_field) == parent(end_field)
end
|
Instance Method Details
#end_node ⇒ Object
139
140
141
|
# File 'lib/sablon/processor/document/blocks.rb', line 139
def end_node
@end_node ||= end_field.start_node
end
|
#remove_control_elements ⇒ Object
129
130
131
132
133
|
# File 'lib/sablon/processor/document/blocks.rb', line 129
def remove_control_elements
body.each(&:remove)
start_field.remove
end_field.remove
end
|
#start_node ⇒ Object
135
136
137
|
# File 'lib/sablon/processor/document/blocks.rb', line 135
def start_node
@start_node ||= start_field.end_node
end
|