Class: FluentCommandBuilder::Tf::V2010::Label

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, label_name, item_spec, scope = nil) ⇒ Label

Returns a new instance of Label.



932
933
934
935
936
937
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 932

def initialize(builder, label_name, item_spec, scope=nil)
  super builder
  @builder.append " label #{@builder.format label_name}"
  @builder.append "@#{@builder.format scope}" unless scope.nil?
  @builder.append " #{@builder.format item_spec}"
end

Instance Method Details

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

Yields:

  • (@builder)


953
954
955
956
957
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 953

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

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

Yields:

  • (@builder)


969
970
971
972
973
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 969

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

#comment(comment) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


948
949
950
951
952
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 948

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

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

Yields:

  • (@builder)


963
964
965
966
967
968
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 963

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

#owner(owner_name) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


938
939
940
941
942
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 938

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

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

Yields:

  • (@builder)


958
959
960
961
962
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 958

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

#version(version_spec) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


943
944
945
946
947
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 943

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