Class: Prismic::Fragments::StructuredText::Block::ListItem
- Inherits:
-
Text
- Object
- Text
- Prismic::Fragments::StructuredText::Block::ListItem
- Defined in:
- lib/prismic/fragments/structured_text.rb
Instance Attribute Summary (collapse)
-
- (Object) ordered
(also: #ordered?)
Returns the value of attribute ordered.
Attributes inherited from Text
Instance Method Summary (collapse)
- - (Object) as_html(link_resolver, html_serializer = nil)
-
- (ListItem) initialize(text, spans, ordered, label = nil)
constructor
A new instance of ListItem.
Methods inherited from Text
#as_text, #prepare_spans, #serialize
Constructor Details
- (ListItem) initialize(text, spans, ordered, label = nil)
Returns a new instance of ListItem
308 309 310 311 |
# File 'lib/prismic/fragments/structured_text.rb', line 308 def initialize(text, spans, ordered, label = nil) super(text, spans, label) @ordered = ordered end |
Instance Attribute Details
- (Object) ordered Also known as: ordered?
Returns the value of attribute ordered
305 306 307 |
# File 'lib/prismic/fragments/structured_text.rb', line 305 def ordered @ordered end |
Instance Method Details
- (Object) as_html(link_resolver, html_serializer = nil)
313 314 315 316 317 318 319 320 |
# File 'lib/prismic/fragments/structured_text.rb', line 313 def as_html(link_resolver, html_serializer=nil) custom_html = html_serializer && html_serializer.serialize(self, super) if custom_html.nil? %(<li#{class_code}>#{super}</li>) else custom_html end end |