lib/solaris/patchdiag.rb
# Returns an array of Solaris::PatchdiagEntry from the
# patchdiag.xref with the given patch number (a String like
# xxxxxx-yy or xxxxxx or a Solaris::Patch), sorted by minor number.
# If both a major and minor number are supplied (xxxxxx-yy) then
# returned entries (normally only one) will match exactly. If only
# a major number (xxxxxx) is supplied then all entries with that
# major number are returned. Returns an empty array if no such
# patches can be found. This method overrides Enumerable#find.
Returns an array of Solaris::PatchdiagEntry from the
patchdiag.xref with the given patch number (a String like
xxxxxx-yy or xxxxxx or a Solaris::Patch), sorted by minor number.
If both a major and minor number are supplied (xxxxxx-yy) then
returned entries (normally only one) will match exactly. If only
a major number (xxxxxx) is supplied then all entries with that
major number are returned. Returns an empty array if no such
patches can be found. This method overrides Enumerable#find.
Returns an array of Solaris :: PatchdiagEntry from the patchdiag . xref with the given patch number ( a String like xxxxxx - yy or xxxxxx or a Solaris :: Patch ) sorted by minor number . If both a major and minor number are supplied ( xxxxxx - yy ) then returned entries ( normally only one ) will match exactly . If only a major number ( xxxxxx ) is supplied then all entries with that major number are returned . Returns an empty array if no such patches can be found . This method overrides Enumerable#find .
def find(patch)
      patch = Patch.new(patch.to_s)
      property = patch.minor ? :to_s : :major
      comparator = patch.send(property)
      @entries.select { |pde| pde.patch.send(property) == comparator }
    end
def find ( patch ) patch = Patch . new ( patch . to_s ) property = patch . minor ? :to_s : :major comparator = patch . send ( property ) @entries . select { | pde | pde . patch . send ( property ) == comparator } end
Returns an array of Solaris::PatchdiagEntry from the
patchdiag.xref with the given patch number (a String like
xxxxxx-yy or xxxxxx or a Solaris::Patch), sorted by minor number.
Returns an array of Solaris :: PatchdiagEntry from the patchdiag . xref with the given patch number ( a String like xxxxxx - yy or xxxxxx or a Solaris :: Patch ) sorted by minor number .
patch