Class: DropboxApi::Metadata::SharedLinkMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/dropbox_api/metadata/shared_link_metadata.rb

Overview

This class is used as an adapter so we can create an object of the pertinent class when we need to infer the type from the data.

This same pattern is used in DropboxApi::Metadata::Resource

Class Method Summary collapse

Class Method Details

.new(data) ⇒ Object


8
9
10
# File 'lib/dropbox_api/metadata/shared_link_metadata.rb', line 8

def new(data)
  class_for(data[".tag"].to_sym).new(data)
end