class Libnotify::IconFinder::Icon

Constants

ICON_REGEX

Attributes

fullpath[R]

Public Class Methods

new(fullpath) click to toggle source
# File lib/libnotify/icon_finder.rb, line 20
def initialize(fullpath)
  @fullpath = fullpath
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/libnotify/icon_finder.rb, line 33
def <=>(other)
  result = other.resolution <=> self.resolution
  result = self.fullpath    <=> other.fullpath if result == 0
  result
end
resolution() click to toggle source
# File lib/libnotify/icon_finder.rb, line 25
def resolution
  @resolution ||= @fullpath[ICON_REGEX, 1].to_i
end
to_s() click to toggle source
# File lib/libnotify/icon_finder.rb, line 29
def to_s
  fullpath
end