Class: RSS::Rss
- Includes:
- RSS09, RootElementMixin
- Defined in:
- lib/rss/0.9.rb,
lib/rss/2.0.rb,
lib/rss/trackback.rb
Defined Under Namespace
Classes: Channel
Constant Summary
Constants included from RSS09
RSS::RSS09::ELEMENTS, RSS::RSS09::NSPOOL
Constants inherited from Element
Element::GET_ATTRIBUTES, Element::HAVE_CHILDREN_ELEMENTS, Element::INDENT, Element::MODELS, Element::MUST_CALL_VALIDATORS, Element::NEED_INITIALIZE_VARIABLES, Element::PLURAL_FORMS, Element::TO_ELEMENT_METHODS
Instance Attribute Summary collapse
-
#encoding ⇒ Object
Returns the value of attribute encoding.
-
#rss_version ⇒ Object
Returns the value of attribute rss_version.
-
#standalone ⇒ Object
Returns the value of attribute standalone.
-
#version ⇒ Object
Returns the value of attribute version.
Attributes included from RootElementMixin
Attributes included from XMLStyleSheetMixin
Attributes inherited from Element
Instance Method Summary collapse
- #image ⇒ Object
-
#initialize(rss_version, version = nil, encoding = nil, standalone = nil) ⇒ Rss
constructor
A new instance of Rss.
- #items ⇒ Object
- #setup_maker_elements(maker) ⇒ Object
- #textinput ⇒ Object
Methods included from RootElementMixin
Methods included from RSS09
Methods inherited from Element
#convert, #converter=, #full_name, get_attributes, have_children_elements, inherited, install_ns, models, must_call_validators, need_initialize_variables, plural_forms, required_prefix, required_uri, #setup_maker, #tag_name, tag_name, to_element_methods, #to_s, #validate, #validate_for_stream
Methods included from BaseModel
#install_date_element, #install_have_child_element, #install_have_children_element, #install_text_element
Methods included from Utils
element_initialize_arguments?, get_file_and_line_from_caller, html_escape, new_with_value_if_need, to_class_name
Constructor Details
#initialize(rss_version, version = nil, encoding = nil, standalone = nil) ⇒ Rss
Returns a new instance of Rss.
27 28 29 |
# File 'lib/rss/0.9.rb', line 27 def initialize(rss_version, version=nil, encoding=nil, standalone=nil) super end |
Instance Attribute Details
#encoding ⇒ Object
Returns the value of attribute encoding.
25 26 27 |
# File 'lib/rss/0.9.rb', line 25 def encoding @encoding end |
#rss_version ⇒ Object
Returns the value of attribute rss_version.
25 26 27 |
# File 'lib/rss/0.9.rb', line 25 def rss_version @rss_version end |
#standalone ⇒ Object
Returns the value of attribute standalone.
25 26 27 |
# File 'lib/rss/0.9.rb', line 25 def standalone @standalone end |
#version ⇒ Object
Returns the value of attribute version.
25 26 27 |
# File 'lib/rss/0.9.rb', line 25 def version @version end |
Instance Method Details
#image ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/rss/0.9.rb', line 39 def image if @channel @channel.image else nil end end |
#items ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/rss/0.9.rb', line 31 def items if @channel @channel.items else [] end end |
#setup_maker_elements(maker) ⇒ Object
55 56 57 58 59 60 |
# File 'lib/rss/0.9.rb', line 55 def setup_maker_elements(maker) super items.each do |item| item.setup_maker(maker.items) end end |
#textinput ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/rss/0.9.rb', line 47 def textinput if @channel @channel.textInput else nil end end |