Sha256: 708b2a1bf16c9af28ec36995d955aab98de9a0d963f52aa6706182e6f11e4778
Contents?: true
Size: 676 Bytes
Versions: 8
Compression:
Stored size: 676 Bytes
Contents
module DropboxApi::Metadata # Example of a serialized FileMemberAction: # # ```json # { # ".tag": "success", # "success": { # ".tag": "viewer" # } # } # ``` class FileMemberAction < Base class << self def new(data) tag = data[".tag"] class_for(tag.to_sym).new(data[tag]) end private def class_for(tag) case tag when :success DropboxApi::Metadata::AccessLevel when :member_error DropboxApi::Errors::FileMemberActionError else raise ArgumentError, "Unable to build individual result with `#{tag}`" end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems