Class: WCC::Contentful::RichText::Heading
- Inherits:
-
Struct
- Object
- Struct
- WCC::Contentful::RichText::Heading
- Includes:
- Node
- Defined in:
- lib/wcc/contentful/rich_text.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#data ⇒ Object
Returns the value of attribute data.
-
#nodeType ⇒ Object
Returns the value of attribute nodeType.
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Node
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content
158 159 160 |
# File 'lib/wcc/contentful/rich_text.rb', line 158 def content @content end |
#data ⇒ Object
Returns the value of attribute data
158 159 160 |
# File 'lib/wcc/contentful/rich_text.rb', line 158 def data @data end |
#nodeType ⇒ Object
Returns the value of attribute nodeType
158 159 160 |
# File 'lib/wcc/contentful/rich_text.rb', line 158 def nodeType @nodeType end |
Class Method Details
.matches?(node_type) ⇒ Boolean
162 163 164 |
# File 'lib/wcc/contentful/rich_text.rb', line 162 def self.matches?(node_type) node_type =~ /heading-(\d+)/ end |
Instance Method Details
#size ⇒ Object
166 167 168 |
# File 'lib/wcc/contentful/rich_text.rb', line 166 def size @size ||= /heading-(\d+)/.match(nodeType)[1]&.to_i end |