Class: ContentfulConverter::Nodes::Paragraph

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

Instance Attribute Summary

Attributes inherited from Base

#content, #node_type, #nokogiri_node, #parent

Instance Method Summary collapse

Methods inherited from Base

#add_content, #initialize

Constructor Details

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

Instance Method Details

#needs_p_wrapping?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/contentful_converter/nodes/paragraph.rb', line 8

def needs_p_wrapping?
  false
end

#to_h(params = {}) ⇒ Object



12
13
14
15
16
17
# File 'lib/contentful_converter/nodes/paragraph.rb', line 12

def to_h(params = {})
  super
  return nil if params[:content].empty?

  params
end