class Epages::ImageSize

Attributes

images[RW]
name[RW]

Public Class Methods

new(data) click to toggle source
# File lib/epages/image_size.rb, line 9
def initialize(data)
  parse_attribute_as_array_of(:images, data.delete(:sizes), Epages::Image)
  parse_attributes(data)
end

Public Instance Methods

length() click to toggle source

return the length of the slideshow

# File lib/epages/image_size.rb, line 28
def length
  images.size
end
sizes() click to toggle source

return a sorted array with the name of all available sizes

# File lib/epages/image_size.rb, line 15
def sizes
  images.collect(&:classifier).sort
end