Class: FluentCommandBuilder::Tf::V2010::Labels

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 = nil) ⇒ Labels

Returns a new instance of Labels.



995
996
997
998
999
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 995

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

Instance Method Details

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

Yields:

  • (@builder)


1010
1011
1012
1013
1014
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 1010

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

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

Yields:

  • (@builder)


1005
1006
1007
1008
1009
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 1005

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

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

Yields:

  • (@builder)


1015
1016
1017
1018
1019
1020
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 1015

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)


1000
1001
1002
1003
1004
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 1000

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