Sha256: 559f6641ab39e3f1e89723e727468f7929a73b8e1c50d0022f2903f1b93496eb
Contents?: true
Size: 1006 Bytes
Versions: 1
Compression:
Stored size: 1006 Bytes
Contents
module LayerVault class Project < LayerVault::Model class << self def for(organization, project) resp = MultiJson.decode(LayerVault.client.project(organization, project)) instance = build_associations(resp, :folders, :files) instance.set_context(organization: organization, project:project) end end def create_folder(folder_name) LayerVault.client.create_folder( context.organization, context.project_name, folder_name ) end def delete_folder(folder_name) LayerVault.client.delete_folder( context.organization, context.project_name, folder_name ) end def move_folder(folder_name, destination_name) LayerVault.client.move_folder( context.organization, context.project_name, folder_name, to: destination_name ) end def change_folder_color(folder_name, destination_name, color) LayerVault.client.change_folder_color( context.organization, context.project_name, folder_name, color: color ) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
layervault-0.1.2 | lib/layervault/project.rb |