Class: Glossarist::Asset

Inherits:
Object
  • Object
show all
Defined in:
lib/glossarist/asset.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Asset

Returns a new instance of Asset.



10
11
12
# File 'lib/glossarist/asset.rb', line 10

def initialize(path)
  @path = path
end

Instance Attribute Details

#pathObject

Returns the value of attribute path.



8
9
10
# File 'lib/glossarist/asset.rb', line 8

def path
  @path
end

Instance Method Details

#eql?(asset) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/glossarist/asset.rb', line 14

def eql?(asset)
  path == asset.path
end

#hashObject



18
19
20
# File 'lib/glossarist/asset.rb', line 18

def hash
  path.hash
end