Skip to content

Commit

Permalink
Improved documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mchf committed Nov 23, 2016
1 parent d6f39d9 commit f726f9a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/modules/LanItems.rb
Expand Up @@ -2726,6 +2726,15 @@ def export_udevs(devices)
deep_copy(ay)
end

# Searches available items according sysconfig option
#
# Expects a block. The block is provided
# with a hash of every item's ifcfg options. Returns
# list of device names for whose the block evaluates to true.
#
# ifcfg hash<string, string> is in form { <sysconfig_key> -> <value> }
#
# @return [Array] list of device names
def find_by_sysconfig
items = GetNetcardInterfaces().select do |iface|
ifcfg = GetDeviceMap(iface) || {}
Expand Down

0 comments on commit f726f9a

Please sign in to comment.