module ChunkyPNG

def self.Dimension(*args)

Other tags:
    See: ChunkyPNG::Dimension -

Raises:
  • (ArgumentError) - If the argument(s) given where not understood as a dimension.

Returns:
  • (ChunkyPNG::Dimension) - The dimension created by this factory method.
  • (ChunkyPNG::Dimension) - The instantiated dimension.
  • (ChunkyPNG::Dimension) - The instantiated dimension.
  • (ChunkyPNG::Dimension) - The instantiated dimension.
  • (ChunkyPNG::Dimension) - The instantiated dimension.

Parameters:
  • hash (Hash) -- An hash with a 'height' or :height key for the
  • ary (Array) -- An array with the desired width as first element and the
  • string (String) -- A string from which a width and height value can be parsed, e.g.
  • height (Integer) -- The height-component of the dimension.
  • width (Integer) -- The width-component of the dimension.

Overloads:
  • Dimension(hash)
  • Dimension(ary)
  • Dimension(string)
  • Dimension(width, height)
def self.Dimension(*args)
  case args.length
  when 2; ChunkyPNG::Dimension.new(*args)
  when 1; build_dimension_from_object(args.first)
  else raise ArgumentError,
    "Don't know how to construct a dimension from #{args.inspect}"
  end
end