Class: Desktop::Image

Inherits:
Object
  • Object
show all
Defined in:
lib/desktop/image.rb

Direct Known Subclasses

LocalImage, WebImage

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Image

Returns a new instance of Image.



5
6
7
# File 'lib/desktop/image.rb', line 5

def initialize(path)
  @path = path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



3
4
5
# File 'lib/desktop/image.rb', line 3

def path
  @path
end

Instance Method Details

#dataObject

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/desktop/image.rb', line 13

def data
  raise NotImplementedError
end

#filenameObject



9
10
11
# File 'lib/desktop/image.rb', line 9

def filename
  File.basename path
end