Module: ZypperUtils
- Included in:
- Zypper::Repository, Zypper::Service, Zypper::Update
- Defined in:
- lib/zypper/utils.rb
Constant Summary collapse
- XML_COMMANDS_GET =
'xml'
- PARAMS_FOR_TYPES =
{ :patch => [ # ['attribute_key', :type_to_convert_to], [:interactive, :boolean], [:pkgmanager, :boolean], [:restart, :boolean], ], :repo => [ [:autorefresh, :boolean], [:gpgcheck, :boolean], [:enabled, :boolean], ], :service => [ [:autorefresh, :boolean], [:enabled, :boolean], # Treat :repo entry as :repo subitem [:repo, :subitem], ], }
- ATTRIBUTE_STARTS_WITH =
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Only getters are public.
-
#last_error_message ⇒ Object
readonly
Only getters are public.
-
#last_exit_status ⇒ Object
readonly
Only getters are public.
-
#last_message ⇒ Object
readonly
Only getters are public.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Object
Constructor.
Instance Attribute Details
#config ⇒ Object
Only getters are public
57 58 59 |
# File 'lib/zypper/utils.rb', line 57 def config @config end |
#last_error_message ⇒ Object
Only getters are public
57 58 59 |
# File 'lib/zypper/utils.rb', line 57 def @last_error_message end |
#last_exit_status ⇒ Object
Only getters are public
57 58 59 |
# File 'lib/zypper/utils.rb', line 57 def last_exit_status @last_exit_status end |
#last_message ⇒ Object
Only getters are public
57 58 59 |
# File 'lib/zypper/utils.rb', line 57 def @last_message end |
Instance Method Details
#initialize(params = {}) ⇒ Object
Constructor
See Zypper::Config new() for more info
65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/zypper/utils.rb', line 65 def initialize(params = {}) # Config is the given parameter if (params.instance_of?(Zypper::Config)) self.config = params # Called directly elsif (params.is_a?(Hash)) self.config = Zypper::Config.new params # Unknown call method else raise "Parameters #{params.inspect} is neither Zypper::Config nor Hash with options" end end |