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
823
824
825
|
# File 'lib/rss/maker/base.rb', line 823
def inline_html?
@type == "html"
end
|
#inline_other? ⇒ Boolean
831
832
833
|
# File 'lib/rss/maker/base.rb', line 831
def inline_other?
!out_of_line? and ![nil, "text", "html", "xhtml"].include?(@type)
end
|
#inline_other_base64? ⇒ Boolean
845
846
847
848
|
# File 'lib/rss/maker/base.rb', line 845
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
835
836
837
838
|
# File 'lib/rss/maker/base.rb', line 835
def inline_other_text?
return false if @type.nil? or out_of_line?
/\Atext\//i.match(@type) ? true : false
end
|
#inline_other_xml? ⇒ Boolean
840
841
842
843
|
# File 'lib/rss/maker/base.rb', line 840
def inline_other_xml?
return false if @type.nil? or out_of_line?
/[\+\/]xml\z/i.match(@type) ? true : false
end
|
#inline_text? ⇒ Boolean
819
820
821
|
# File 'lib/rss/maker/base.rb', line 819
def inline_text?
[nil, "text", "html"].include?(@type)
end
|
#inline_xhtml? ⇒ Boolean
827
828
829
|
# File 'lib/rss/maker/base.rb', line 827
def inline_xhtml?
@type == "xhtml"
end
|
#out_of_line? ⇒ Boolean
850
851
852
|
# File 'lib/rss/maker/base.rb', line 850
def out_of_line?
not @src.nil? and @content.nil?
end
|
#xml_content=(content) ⇒ Object
Also known as:
xml=
811
812
813
814
|
# File 'lib/rss/maker/base.rb', line 811
def xml_content=(content)
content = ensure_xml_content(content) if inline_xhtml?
@xml_content = content
end
|