Sha256: 4f6f311a1727c62500ed66ffbf3a0647388021df9df4661d6c8907fe74d6dd9f
Contents?: true
Size: 726 Bytes
Versions: 1
Compression:
Stored size: 726 Bytes
Contents
# frozen_string_literal: true module Manifold module API # Projects API class Project attr_reader :name, :directory def initialize(name, directory: Pathname.pwd.join(name)) self.name = name self.directory = Pathname(directory) end def self.create(name, directory: Pathname.pwd.join(name)) new(name, directory: directory).tap do |project| [project.workspaces_directory, project.vectors_directory].each(&:mkpath) end end def workspaces_directory directory.join("workspaces") end def vectors_directory directory.join("vectors") end private attr_writer :name, :directory end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
manifold-cli-0.0.7 | lib/manifold/project/project.rb |