Class: Pairzone::Commands::Start

Inherits:
Object
  • Object
show all
Defined in:
lib/pairzone/commands/start.rb

Instance Method Summary collapse

Constructor Details

#initialize(project_name, identity, options) ⇒ Start

Returns a new instance of Start.



7
8
9
10
11
# File 'lib/pairzone/commands/start.rb', line 7

def initialize(project_name, identity, options)
  @project_name = project_name
  @identity = File.expand_path(identity)
  @options = options
end

Instance Method Details

#executeObject



13
14
15
16
17
18
19
20
# File 'lib/pairzone/commands/start.rb', line 13

def execute
  @pairzone = Pairzone::Api::Pairzone.start(:project_name => @project_name, :collaborators => collaborators)
  @pairzone.push_code(@identity)
  unless @options[:background]
    @pairzone.connect(@identity)
    @pairzone.fetch_code(@identity)
  end
end