Sha256: 8d2f3cf2efad2fb9641fa5b417867e877f86d72e744fc6437c1c7596608b71f3

Contents?: true

Size: 415 Bytes

Versions: 17

Compression:

Stored size: 415 Bytes

Contents

module Rapa
  class Image
    # @return [Hash]
    attr_reader :source

    # @param source [Hash]
    def initialize(source)
      @source = source
    end

    # @return [Integer]
    def height
      ::Rapa::Quantity.new(source["Height"])
    end

    # @return [String]
    def url
      source["URL"]
    end

    # @return [Integer]
    def width
      ::Rapa::Quantity.new(source["Width"])
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rapa-0.6.0 lib/rapa/image.rb
rapa-0.5.7 lib/rapa/image.rb
rapa-0.5.6 lib/rapa/image.rb
rapa-0.5.5 lib/rapa/image.rb
rapa-0.5.4 lib/rapa/image.rb
rapa-0.5.3 lib/rapa/image.rb
rapa-0.5.2 lib/rapa/image.rb
rapa-0.5.1 lib/rapa/image.rb
rapa-0.5.0 lib/rapa/image.rb
rapa-0.4.3 lib/rapa/image.rb
rapa-0.4.2 lib/rapa/image.rb
rapa-0.4.1 lib/rapa/image.rb
rapa-0.4.0 lib/rapa/image.rb
rapa-0.3.3 lib/rapa/image.rb
rapa-0.3.2 lib/rapa/image.rb
rapa-0.3.1 lib/rapa/image.rb
rapa-0.3.0 lib/rapa/image.rb