Class: FluentCommandBuilder::SecurityOSX::V108::UnlockKeychain

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

Instance Method Summary collapse

Methods inherited from CommandBase

#configure!, #execute!, #to_s

Constructor Details

#initialize(underlying_builder) ⇒ UnlockKeychain

Returns a new instance of UnlockKeychain.



164
165
166
167
# File 'lib/fluent_command_builder/command_builders/security_osx_108.rb', line 164

def initialize(underlying_builder)
  super underlying_builder
  @b.append ' unlock-keychain'
end

Instance Method Details

#keychain(keychain) {|@b| ... } ⇒ Object

Yields:

  • (@b)


178
179
180
181
182
# File 'lib/fluent_command_builder/command_builders/security_osx_108.rb', line 178

def keychain(keychain)
  @b.append " #{@b.format keychain}"
  yield @b if block_given?
  self
end

#no_password {|@b| ... } ⇒ Object

Yields:

  • (@b)


168
169
170
171
172
# File 'lib/fluent_command_builder/command_builders/security_osx_108.rb', line 168

def no_password
  @b.append ' -u'
  yield @b if block_given?
  self
end

#password(password) {|@b| ... } ⇒ Object

Yields:

  • (@b)


173
174
175
176
177
# File 'lib/fluent_command_builder/command_builders/security_osx_108.rb', line 173

def password(password)
  @b.append " -p #{@b.format_password password}"
  yield @b if block_given?
  self
end