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
114
115
116
|
# File 'lib/sablon/processor/document/blocks.rb', line 114
def self.encloses?(start_field, end_field)
super && parent(start_field) == parent(end_field)
end
|
Instance Method Details
#end_node ⇒ Object
128
129
130
|
# File 'lib/sablon/processor/document/blocks.rb', line 128
def end_node
@end_node ||= end_field.start_node
end
|
#remove_control_elements ⇒ Object
118
119
120
121
122
|
# File 'lib/sablon/processor/document/blocks.rb', line 118
def remove_control_elements
body.each(&:remove)
start_field.remove
end_field.remove
end
|
#start_node ⇒ Object
124
125
126
|
# File 'lib/sablon/processor/document/blocks.rb', line 124
def start_node
@start_node ||= start_field.end_node
end
|