Class: I18n::Index::Occurence

Inherits:
Object
  • Object
show all
Defined in:
lib/i18n/index/occurence.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, filename, position) ⇒ Occurence

Returns a new instance of Occurence.



6
7
8
9
10
# File 'lib/i18n/index/occurence.rb', line 6

def initialize(key, filename, position)
 @key = key
 @filename = filename
 @position = position
end

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



4
5
6
# File 'lib/i18n/index/occurence.rb', line 4

def filename
  @filename
end

#keyObject (readonly)

Returns the value of attribute key.



4
5
6
# File 'lib/i18n/index/occurence.rb', line 4

def key
  @key
end

#positionObject (readonly)

Returns the value of attribute position.



4
5
6
# File 'lib/i18n/index/occurence.rb', line 4

def position
  @position
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



12
13
14
# File 'lib/i18n/index/occurence.rb', line 12

def ==(other)
  key == other.key && filename == other.filename && position == other.position
end