Class: Conquer::Dzen::Graphics::Icon

Inherits:
Graphic
  • Object
show all
Defined in:
lib/conquer/dzen/graphics/icon.rb

Constant Summary collapse

ICONS_PATH =
File.expand_path('../../../../../icons', __FILE__)

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Graphic

#move, #to_s

Methods included from Positioning

#ignore_bg, #lock_x, #shift, #unlock_x

Constructor Details

#initialize(path) ⇒ Icon

Returns a new instance of Icon.



10
11
12
13
14
15
16
17
# File 'lib/conquer/dzen/graphics/icon.rb', line 10

def initialize(path)
  super()
  path = File.join(ICONS_PATH, "#{path}.xbm") if path.is_a?(Symbol)
  STDERR.puts(path)
  @path = path
  @template = '^i(%s)'
  @template_args = [path]
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



8
9
10
# File 'lib/conquer/dzen/graphics/icon.rb', line 8

def path
  @path
end