Class: RSS::Maker::ImageItemModel::ImageItemBase

Inherits:
Base
  • Object
show all
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

Attributes inherited from Base

#maker

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

#aboutObject

Returns the value of attribute about



26
27
28
# File 'lib/rss/maker/image.rb', line 26

def about
  @about
end

#image_heightObject Also known as: height

Returns the value of attribute image_height



26
27
28
# File 'lib/rss/maker/image.rb', line 26

def image_height
  @image_height
end

#image_widthObject Also known as: width

Returns the value of attribute image_width



26
27
28
# File 'lib/rss/maker/image.rb', line 26

def image_width
  @image_width
end

#resourceObject

Returns the value of attribute resource



26
27
28
# File 'lib/rss/maker/image.rb', line 26

def resource
  @resource
end

Instance Method Details

#have_required_values?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/rss/maker/image.rb', line 36

def have_required_values?
  @about
end

#to_feed(feed, current) ⇒ Object



40
41
42
43
44
45
46
47
# File 'lib/rss/maker/image.rb', line 40

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