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)


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

def inline_html?
  @type == "html"
end

#inline_other?Boolean

Returns:

  • (Boolean)


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

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

#inline_other_base64?Boolean

Returns:

  • (Boolean)


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

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)


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

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)


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

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)


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

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

#inline_xhtml?Boolean

Returns:

  • (Boolean)


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

def inline_xhtml?
  @type == "xhtml"
end

#out_of_line?Boolean

Returns:

  • (Boolean)


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

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

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



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

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