Sha256: d8a6c0d5ffae310c37aaf469b5cfe5f4974c1956547e812d8ecfe29bcf423cca

Contents?: true

Size: 428 Bytes

Versions: 18

Compression:

Stored size: 428 Bytes

Contents

require_relative 'api/resource_collection'
require_relative 'folder'

class ContextIO
  class FolderCollection
    include ContextIO::API::ResourceCollection

    self.resource_class = ContextIO::Folder
    self.association_name = :folders

    belongs_to :source

    def create(folder_name, folder_delimiter='/')
      api.request(:put, "#{resource_url}/#{folder_name}", delim: folder_delimiter)['success']
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
contextio-2.0.0 lib/contextio/folder_collection.rb
contextio-1.8.1 lib/contextio/folder_collection.rb
contextio-1.8.0 lib/contextio/folder_collection.rb
contextio-1.7.2 lib/contextio/folder_collection.rb
contextio-1.7.1 lib/contextio/folder_collection.rb
contextio-1.7.0 lib/contextio/folder_collection.rb
contextio-1.6.0 lib/contextio/folder_collection.rb
contextio-1.5.0 lib/contextio/folder_collection.rb
contextio-1.4.0 lib/contextio/folder_collection.rb
contextio-1.3.0 lib/contextio/folder_collection.rb
contextio-1.2.4 lib/contextio/folder_collection.rb
contextio-1.2.3 lib/contextio/folder_collection.rb
contextio-1.2.2 lib/contextio/folder_collection.rb
contextio-1.2.1 lib/contextio/folder_collection.rb
contextio-1.2.0 lib/contextio/folder_collection.rb
contextio-1.1.0 lib/contextio/folder_collection.rb
contextio-1.0.1 lib/contextio/folder_collection.rb
contextio-1.0.0 lib/contextio/folder_collection.rb