Class: FluentCommandBuilder::Tf::V2010::Lock

Inherits:
CommandBase
  • Object
show all
Defined in:
lib/fluent_command_builder/command_builders/tf_2010.rb

Instance Method Summary collapse

Methods inherited from CommandBase

#execute!, #to_s

Constructor Details

#initialize(builder, item_spec) ⇒ Lock

Returns a new instance of Lock.



1050
1051
1052
1053
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 1050

def initialize(builder, item_spec)
  super builder
  @builder.append " lock #{@builder.format item_spec}"
end

Instance Method Details

#collection(team_project_collection_url) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


1076
1077
1078
1079
1080
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 1076

def collection(team_project_collection_url)
  @builder.append " /collection:#{@builder.format team_project_collection_url}"
  yield @builder if block_given?
  self
end

#lock(lock_type) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


1054
1055
1056
1057
1058
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 1054

def lock(lock_type)
  @builder.append " /lock:#{@builder.format lock_type}"
  yield @builder if block_given?
  self
end

#login(username, password = nil) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


1070
1071
1072
1073
1074
1075
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 1070

def (username, password=nil)
  @builder.append " /login:#{@builder.format username}"
  @builder.append ",#{@builder.format password}" unless password.nil?
  yield @builder if block_given?
  self
end

#recursive {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


1065
1066
1067
1068
1069
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 1065

def recursive
  @builder.append ' /recursive'
  yield @builder if block_given?
  self
end

#workspace(workspace_name, workspace_owner = nil) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


1059
1060
1061
1062
1063
1064
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 1059

def workspace(workspace_name, workspace_owner=nil)
  @builder.append " /workspace:#{@builder.format workspace_name}"
  @builder.append ";#{@builder.format workspace_owner}" unless workspace_owner.nil?
  yield @builder if block_given?
  self
end