Method: Cnvrg::Project#initialize
- Defined in:
- lib/cnvrg/project.rb
#initialize(project_home = nil, slug: nil, owner: nil) ⇒ Project
Returns a new instance of Project.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/cnvrg/project.rb', line 11 def initialize(project_home = nil, slug: nil, owner: nil) begin @local_path = project_home @working_dir = project_home # read from env and new config file config = Cnvrg::Helpers.get_config_v2_project(project_home, owner, slug) @title = config[:project_name] @slug = config[:project_slug] @owner = config[:owner] @is_branch = config[:is_branch] @is_git = config[:git] || false @base_resource = "users/#{@owner}/projects/#{@slug}/" @machines = nil rescue => e end end |