Class: AdLocalize::Entities::Translation

Inherits:
Object
  • Object
show all
Defined in:
lib/ad_localize/entities/translation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(locale:, key:, value:, comment: nil) ⇒ Translation

Returns a new instance of Translation.



12
13
14
15
16
17
# File 'lib/ad_localize/entities/translation.rb', line 12

def initialize(locale:, key:, value:, comment: nil)
  @locale = locale
  @key = key
  @value = value
  @comment = comment
end

Instance Attribute Details

#commentObject (readonly)

Returns the value of attribute comment.



4
5
6
# File 'lib/ad_localize/entities/translation.rb', line 4

def comment
  @comment
end

#keyObject (readonly)

Returns the value of attribute key.



4
5
6
# File 'lib/ad_localize/entities/translation.rb', line 4

def key
  @key
end

#localeObject (readonly)

Returns the value of attribute locale.



4
5
6
# File 'lib/ad_localize/entities/translation.rb', line 4

def locale
  @locale
end

#valueObject

Returns the value of attribute value.



10
11
12
# File 'lib/ad_localize/entities/translation.rb', line 10

def value
  @value
end

Instance Method Details

#==(o) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/ad_localize/entities/translation.rb', line 19

def ==(o)
  o.class == self.class &&
  o.locale == locale &&
  o.key == key &&
  o.value == value &&
  o.comment == comment
end