Sha256: 882c1f2d9a0bf87df76900a4ac6c3a22f5bb5e0c756a3ad3e7594ab1ec185c40

Contents?: true

Size: 406 Bytes

Versions: 1

Compression:

Stored size: 406 Bytes

Contents

module Openseadragon
  class Image
    attr_accessor :id, :width, :height

    class_attribute :file_resolver
   
    class << self
      def find(id)
        file_resolver.find(id)
      end
    end

    def initialize(attributes = {})
      self.id = attributes[:id]
      self.width = attributes[:width]
      self.height = attributes[:height]
    end

    def as_json
      { id: id}
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
openseadragon-0.0.1 app/models/openseadragon/image.rb