Class: RSS::Maker::ItemsBase::ItemBase::ContentBase

Inherits:
Base
  • Object
show all
Includes:
AtomTextConstructBase::EnsureXMLContent
Defined in:
lib/rss/maker/base.rb

Constant Summary

Constants inherited from Base

Base::NEED_INITIALIZE_VARIABLES, Base::OTHER_ELEMENTS

Instance Attribute Summary

Attributes inherited from Base

#maker

Instance Method Summary collapse

Methods included from AtomTextConstructBase::EnsureXMLContent

#ensure_xml_content, included, #xhtml=

Methods inherited from Base

add_need_initialize_variable, add_other_element, def_array_element, def_classed_element, def_classed_element_without_accessor, def_classed_elements, def_csv_element, def_other_element, def_other_element_without_accessor, #have_required_values?, inherited, inherited_base, #initialize, need_initialize_variables, other_elements, #variable_is_set?

Methods included from Utils::InheritedReader

#inherited_array_reader, #inherited_hash_reader, #inherited_reader

Constructor Details

This class inherits a constructor from RSS::Maker::Base

Instance Method Details

#inline_html?Boolean

Returns:

  • (Boolean)


899
900
901
# File 'lib/rss/maker/base.rb', line 899

def inline_html?
  @type == "html"
end

#inline_other?Boolean

Returns:

  • (Boolean)


907
908
909
# File 'lib/rss/maker/base.rb', line 907

def inline_other?
  !out_of_line? and ![nil, "text", "html", "xhtml"].include?(@type)
end

#inline_other_base64?Boolean

Returns:

  • (Boolean)


921
922
923
924
# File 'lib/rss/maker/base.rb', line 921

def inline_other_base64?
  return false if @type.nil? or out_of_line?
  @type.include?("/") and !inline_other_text? and !inline_other_xml?
end

#inline_other_text?Boolean

Returns:

  • (Boolean)


911
912
913
914
# File 'lib/rss/maker/base.rb', line 911

def inline_other_text?
  return false if @type.nil? or out_of_line?
  /\Atext\//i.match(@type) ? true : false
end

#inline_other_xml?Boolean

Returns:

  • (Boolean)


916
917
918
919
# File 'lib/rss/maker/base.rb', line 916

def inline_other_xml?
  return false if @type.nil? or out_of_line?
  /[\+\/]xml\z/i.match(@type) ? true : false
end

#inline_text?Boolean

Returns:

  • (Boolean)


895
896
897
# File 'lib/rss/maker/base.rb', line 895

def inline_text?
  [nil, "text", "html"].include?(@type)
end

#inline_xhtml?Boolean

Returns:

  • (Boolean)


903
904
905
# File 'lib/rss/maker/base.rb', line 903

def inline_xhtml?
  @type == "xhtml"
end

#out_of_line?Boolean

Returns:

  • (Boolean)


926
927
928
# File 'lib/rss/maker/base.rb', line 926

def out_of_line?
  not @src.nil? and @content.nil?
end

#xml_content=(content) ⇒ Object Also known as: xml=



887
888
889
890
# File 'lib/rss/maker/base.rb', line 887

def xml_content=(content)
  content = ensure_xml_content(content) if inline_xhtml?
  @xml_content = content
end