Sha256: c6c5d62aeee18927b37655f86627de68a57ca10a69401633afb32ec733ff1e92

Contents?: true

Size: 420 Bytes

Versions: 7

Compression:

Stored size: 420 Bytes

Contents

module Rmega
  module Nodes
    class File < Node
      include Deletable
      include Downloadable

      def storage_url
        @storage_url ||= begin
          query_params = data["__n"] ? {n: data["__n"]} : {}
          data['g'] || request({a: 'g', g: 1, n: handle}, query_params)['g']
        end
      end

      def size
        data['s']
      end

      def filesize
        size
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rmega-0.3.2 lib/rmega/nodes/file.rb
rmega-0.3.1 lib/rmega/nodes/file.rb
rmega-0.2.7 lib/rmega/nodes/file.rb
rmega-0.2.6 lib/rmega/nodes/file.rb
rmega-0.2.5 lib/rmega/nodes/file.rb
rmega-0.2.4 lib/rmega/nodes/file.rb
rmega-0.2.2 lib/rmega/nodes/file.rb