Class: ContentfulConverter::Nodes::Text

Inherits:
Base
  • Object
show all
Defined in:
lib/contentful_converter/nodes/text.rb

Direct Known Subclasses

Code, Italic, Strong, Underline

Instance Attribute Summary

Attributes inherited from Base

#content, #node_type, #nokogiri_node, #parent

Instance Method Summary collapse

Methods inherited from Base

#add_content, #initialize, #needs_p_wrapping?

Constructor Details

This class inherits a constructor from ContentfulConverter::Nodes::Base

Instance Method Details

#to_h(params = options) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/contentful_converter/nodes/text.rb', line 8

def to_h(params = options)
  return nil if value.strip.empty?

  super
  params.delete(:content)
  params
end