Class: RSS::Maker::ItemsBase::ItemBase::ContentBase
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
#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?
#inherited_array_reader, #inherited_hash_reader, #inherited_reader
Instance Method Details
#inline_html? ⇒ Boolean
899
900
901
|
# File 'lib/rss/maker/base.rb', line 899
def inline_html?
@type == "html"
end
|
#inline_other? ⇒ 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
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
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
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
895
896
897
|
# File 'lib/rss/maker/base.rb', line 895
def inline_text?
[nil, "text", "html"].include?(@type)
end
|
#inline_xhtml? ⇒ Boolean
903
904
905
|
# File 'lib/rss/maker/base.rb', line 903
def inline_xhtml?
@type == "xhtml"
end
|
#out_of_line? ⇒ 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
|