Class: FluentCommandBuilder::Tf::V2010::RollbackChangeset

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, changeset_from, changeset_to = nil, item_spec = nil) ⇒ RollbackChangeset



1479
1480
1481
1482
1483
1484
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 1479

def initialize(builder, changeset_from, changeset_to=nil, item_spec=nil)
  super builder
  @builder.append " rollback /changeset:#{@builder.format changeset_from}"
  @builder.append "~#{@builder.format changeset_to}" unless changeset_to.nil?
  @builder.append " #{@builder.format item_spec}" unless item_spec.nil?
end

Instance Method Details

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

Yields:

  • (@builder)


1500
1501
1502
1503
1504
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 1500

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

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

Yields:

  • (@builder)


1490
1491
1492
1493
1494
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 1490

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)


1505
1506
1507
1508
1509
1510
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 1505

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

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

Yields:

  • (@builder)


1511
1512
1513
1514
1515
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 1511

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

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

Yields:

  • (@builder)


1485
1486
1487
1488
1489
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 1485

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

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

Yields:

  • (@builder)


1495
1496
1497
1498
1499
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 1495

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