Class: FluentCommandBuilder::UnderlyingBuilder
- Inherits:
-
Object
- Object
- FluentCommandBuilder::UnderlyingBuilder
- Includes:
- ArgumentFormatter
- Defined in:
- lib/fluent_command_builder/internal/underlying_builder.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#execution_context ⇒ Object
Returns the value of attribute execution_context.
-
#password_formatter ⇒ Object
Returns the value of attribute password_formatter.
-
#passwords ⇒ Object
readonly
Returns the value of attribute passwords.
Instance Method Summary collapse
- #append(value) ⇒ Object
- #executable ⇒ Object
- #execute ⇒ Object
-
#initialize(command_builder_config) ⇒ UnderlyingBuilder
constructor
A new instance of UnderlyingBuilder.
- #to_s ⇒ Object
Methods included from ArgumentFormatter
Constructor Details
#initialize(command_builder_config) ⇒ UnderlyingBuilder
Returns a new instance of UnderlyingBuilder.
12 13 14 15 16 17 18 |
# File 'lib/fluent_command_builder/internal/underlying_builder.rb', line 12 def initialize(command_builder_config) @c = command_builder_config @args = nil @passwords = [] @password_formatter = FluentCommandBuilder.password_formatter @execution_context = FluentCommandBuilder.execution_context end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
9 10 11 |
# File 'lib/fluent_command_builder/internal/underlying_builder.rb', line 9 def args @args end |
#execution_context ⇒ Object
Returns the value of attribute execution_context.
10 11 12 |
# File 'lib/fluent_command_builder/internal/underlying_builder.rb', line 10 def execution_context @execution_context end |
#password_formatter ⇒ Object
Returns the value of attribute password_formatter.
10 11 12 |
# File 'lib/fluent_command_builder/internal/underlying_builder.rb', line 10 def password_formatter @password_formatter end |
#passwords ⇒ Object (readonly)
Returns the value of attribute passwords.
9 10 11 |
# File 'lib/fluent_command_builder/internal/underlying_builder.rb', line 9 def passwords @passwords end |
Instance Method Details
#append(value) ⇒ Object
20 21 22 23 24 |
# File 'lib/fluent_command_builder/internal/underlying_builder.rb', line 20 def append(value) v = value.to_s v = @args ? v : v.lstrip @args = @args.to_s + v end |
#executable ⇒ Object
26 27 28 |
# File 'lib/fluent_command_builder/internal/underlying_builder.rb', line 26 def executable @c.executable end |
#execute ⇒ Object
30 31 32 33 34 |
# File 'lib/fluent_command_builder/internal/underlying_builder.rb', line 30 def execute @c.validate_path @c.validate_version @execution_context.execute to_s, visible_command end |