class RSS::ImageFaviconModel::ImageFavicon
常量
- AVAILABLE_SIZES
公共类方法
new(*args) 点击以切换源代码
调用父类方法
# File rss-0.3.1/lib/rss/image.rb, line 166 def initialize(*args) if Utils.element_initialize_arguments?(args) super else super() self.about = args[0] self.size = args[1] end end
required_prefix() 点击以切换源代码
# File rss-0.3.1/lib/rss/image.rb, line 132 def required_prefix IMAGE_PREFIX end
required_uri() 点击以切换源代码
# File rss-0.3.1/lib/rss/image.rb, line 136 def required_uri IMAGE_URI end
公共实例方法
full_name() 点击以切换源代码
# File rss-0.3.1/lib/rss/image.rb, line 176 def full_name tag_name_with_prefix(IMAGE_PREFIX) end
size=(new_value) 点击以切换源代码
# File rss-0.3.1/lib/rss/image.rb, line 152 def size=(new_value) if @do_validate and !new_value.nil? new_value = new_value.strip unless AVAILABLE_SIZES.include?(new_value) attr_name = "#{IMAGE_PREFIX}:size" raise NotAvailableValueError.new(full_name, new_value, attr_name) end end set_size(new_value) end
也别名为:set_size, image_size=
私有实例方法
maker_target(target) 点击以切换源代码
# File rss-0.3.1/lib/rss/image.rb, line 181 def maker_target(target) target.image_favicon end
setup_maker_attributes(favicon) 点击以切换源代码
# File rss-0.3.1/lib/rss/image.rb, line 185 def setup_maker_attributes(favicon) favicon.about = self.about favicon.size = self.size end