Class: Rhelm::Client
- Inherits:
-
Object
- Object
- Rhelm::Client
- Defined in:
- lib/rhelm/client.rb,
lib/rhelm/subcommand_proxy.rb,
lib/rhelm/client/simple_logger.rb
Defined Under Namespace
Classes: Error, SimpleLogger, SubcommandProxy
Constant Summary collapse
- SUBCOMMANDS =
%i( dependency env history install lint list pull rollback status test uninstall upgrade verify version )
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#program ⇒ Object
readonly
Returns the value of attribute program.
Instance Method Summary collapse
- #helm_commit ⇒ Object
- #helm_go_version ⇒ Object
- #helm_version ⇒ Object
-
#initialize(program: "helm", logger: nil, **default_options) ⇒ Client
constructor
A new instance of Client.
- #run_command(subcommand_name, *ordinal_options, **flag_options, &block) ⇒ Object
Constructor Details
#initialize(program: "helm", logger: nil, **default_options) ⇒ Client
Returns a new instance of Client.
16 17 18 19 20 |
# File 'lib/rhelm/client.rb', line 16 def initialize(program: "helm", logger: nil, **) @program = program @logger ||= SimpleLogger.new @default_options = || {} end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
14 15 16 |
# File 'lib/rhelm/client.rb', line 14 def logger @logger end |
#program ⇒ Object (readonly)
Returns the value of attribute program.
14 15 16 |
# File 'lib/rhelm/client.rb', line 14 def program @program end |
Instance Method Details
#helm_commit ⇒ Object
36 37 38 |
# File 'lib/rhelm/client.rb', line 36 def helm_commit version_info[:GitCommit] end |
#helm_go_version ⇒ Object
40 41 42 |
# File 'lib/rhelm/client.rb', line 40 def helm_go_version version_info[:GoVersion] end |
#helm_version ⇒ Object
32 33 34 |
# File 'lib/rhelm/client.rb', line 32 def helm_version version_info[:Version] end |
#run_command(subcommand_name, *ordinal_options, **flag_options, &block) ⇒ Object
28 29 30 |
# File 'lib/rhelm/client.rb', line 28 def run_command(subcommand_name, *, **, &block) SubcommandProxy.new(subcommand_name, self, *, **@default_options.merge(), &block).run end |