Class RSS::ImageFaviconModel::ImageFavicon
In: rss/image.rb
Parent: Element

Methods

Included Modules

RSS10 DublinCoreModel

Constants

AVAILABLE_SIZES = %w(small medium large)

External Aliases

size= -> _size=
size -> image_size

Public Class methods

[Source]

# File rss/image.rb, line 161
      def initialize(*args)
        if Utils.element_initialize_arguments?(args)
          super
        else
          super()
          self.about = args[0]
          self.size = args[1]
        end
      end

[Source]

# File rss/image.rb, line 127
        def required_prefix
          IMAGE_PREFIX
        end

[Source]

# File rss/image.rb, line 131
        def required_uri
          IMAGE_URI
        end

Public Instance methods

[Source]

# File rss/image.rb, line 171
      def full_name
        tag_name_with_prefix(IMAGE_PREFIX)
      end
image_size=(new_value)

Alias for size=

[Source]

# File rss/image.rb, line 147
      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
        __send__(:_size=, new_value)
      end

[Validate]

ruby-doc.org is a service of James Britt and Happy Camper Studios, a Ruby application development company in Phoenix, AZ.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.