class HammerCLIForeman::CommandExtensions::Status
Public Class Methods
normalize_failed_features(features)
click to toggle source
# File lib/hammer_cli_foreman/command_extensions/status.rb, line 32 def self.normalize_failed_features(features) failed_features = [] features.each_pair do |name, error| failed_features << { name: name, error: error } end failed_features end
normalize_features(features)
click to toggle source
# File lib/hammer_cli_foreman/command_extensions/status.rb, line 21 def self.normalize_features(features) active_features = [] features.each_pair do |name, version| active_features << { name: name, version: version } end active_features end
normalize_plugins(plugins)
click to toggle source
# File lib/hammer_cli_foreman/command_extensions/status.rb, line 14 def self.normalize_plugins(plugins) plugins.map! do |plugin| name, version = plugin.split(': ', 2)[1].split(', ', 3)[0..1] { name: name, version: version } end end