Sha256: 54e0809b1dd79bbef5b7f7954eec38e3b13ba5e5bfc0a96cf105280f6a145c5b
Contents?: true
Size: 682 Bytes
Versions: 10
Compression:
Stored size: 682 Bytes
Contents
# frozen_string_literal: true require 'imgix' module Dato module Local module FieldType class File attr_reader :path, :format, :size def self.parse(value, _repo) new( value[:path], value[:format], value[:size] ) end def initialize(path, format, size) @path = path @format = format @size = size end def file Imgix::Client.new( host: 'dato-images.imgix.net', secure: true ).path(path) end def url(*args) file.to_url(*args) end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems