Sha256: 06d3679126946a1ea0f42a56963b56617bc07ede9dcbd9a70e785db47590386a
Contents?: true
Size: 1007 Bytes
Versions: 2
Compression:
Stored size: 1007 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
layervault-0.1.1 | lib/layervault/project.rb |
layervault-0.1.0 | lib/layervault/project.rb |