Class: RSS::Maker::ImageItemModel::ImageItemBase
- Includes:
- DublinCoreModel
- Defined in:
- lib/rss/maker/image.rb
Constant Summary
Constants inherited from Base
Base::NEED_INITIALIZE_VARIABLES, Base::OTHER_ELEMENTS
Instance Attribute Summary collapse
-
#about ⇒ Object
Returns the value of attribute about.
-
#image_height ⇒ Object
(also: #height)
Returns the value of attribute image_height.
-
#image_width ⇒ Object
(also: #width)
Returns the value of attribute image_width.
-
#resource ⇒ Object
Returns the value of attribute resource.
Attributes inherited from Base
Instance Method Summary collapse
Methods included from DublinCoreModel
append_features, install_dublin_core
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, 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 Attribute Details
#about ⇒ Object
Returns the value of attribute about.
27 28 29 |
# File 'lib/rss/maker/image.rb', line 27 def about @about end |
#image_height ⇒ Object Also known as: height
Returns the value of attribute image_height.
27 28 29 |
# File 'lib/rss/maker/image.rb', line 27 def image_height @image_height end |
#image_width ⇒ Object Also known as: width
Returns the value of attribute image_width.
27 28 29 |
# File 'lib/rss/maker/image.rb', line 27 def image_width @image_width end |
#resource ⇒ Object
Returns the value of attribute resource.
27 28 29 |
# File 'lib/rss/maker/image.rb', line 27 def resource @resource end |
Instance Method Details
#have_required_values? ⇒ Boolean
37 38 39 |
# File 'lib/rss/maker/image.rb', line 37 def have_required_values? @about end |
#to_feed(feed, current) ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'lib/rss/maker/image.rb', line 41 def to_feed(feed, current) if current.respond_to?(:image_item=) and have_required_values? item = current.class::ImageItem.new setup_values(item) setup_other_elements(item) current.image_item = item end end |