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
900
901
902
|
# File 'lib/rss/maker/base.rb', line 900
def inline_html?
@type == "html"
end
|
#inline_other? ⇒ 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
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
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
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
896
897
898
|
# File 'lib/rss/maker/base.rb', line 896
def inline_text?
[nil, "text", "html"].include?(@type)
end
|
#inline_xhtml? ⇒ Boolean
904
905
906
|
# File 'lib/rss/maker/base.rb', line 904
def inline_xhtml?
@type == "xhtml"
end
|
#out_of_line? ⇒ 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
|