Class: FluentCommandBuilder::Bundle::V11::Update

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

Instance Method Summary collapse

Methods inherited from CommandBase

#execute!, #to_s

Constructor Details

#initialize(builder, gem = nil) ⇒ Update

Returns a new instance of Update.



260
261
262
263
264
# File 'lib/fluent_command_builder/command_builders/bundle_11.rb', line 260

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

Instance Method Details

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

Yields:

  • (@builder)


265
266
267
268
269
# File 'lib/fluent_command_builder/command_builders/bundle_11.rb', line 265

def local
  @builder.append ' --local'
  yield @builder if block_given?
  self
end

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

Yields:

  • (@builder)


270
271
272
273
274
# File 'lib/fluent_command_builder/command_builders/bundle_11.rb', line 270

def source(source)
  @builder.append " --source=#{@builder.format source}"
  yield @builder if block_given?
  self
end