Sha256: b946b0a844ef09e54418ab2838eaaa5613b83af91444742db98bf4ad809768e4

Contents?: true

Size: 698 Bytes

Versions: 6

Compression:

Stored size: 698 Bytes

Contents

module GeoWorks
  module GeoFileFormatBehavior
    extend ActiveSupport::Concern

    def image_file?
      GeoWorks::ImageFormatService.include?(geo_mime_type)
    end

    def raster_file?
      GeoWorks::RasterFormatService.include?(geo_mime_type)
    end

    def vector_file?
      GeoWorks::VectorFormatService.include?(geo_mime_type)
    end

    def external_metadata_file?
      GeoWorks::MetadataFormatService.include?(geo_mime_type)
    end

    def geo_file_format?
      image_file? || raster_file? || vector_file? || external_metadata_file?
    end

    def image_work?
      false
    end

    def raster_work?
      false
    end

    def vector_work?
      false
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geo_works-0.2.0 app/models/concerns/geo_works/geo_file_format_behavior.rb
geo_works-0.1.4 app/models/concerns/geo_works/geo_file_format_behavior.rb
geo_works-0.1.3 app/models/concerns/geo_works/geo_file_format_behavior.rb
geo_works-0.1.2 app/models/concerns/geo_works/geo_file_format_behavior.rb
geo_works-0.1.1 app/models/concerns/geo_works/geo_file_format_behavior.rb
geo_works-0.1.0 app/models/concerns/geo_works/geo_file_format_behavior.rb