Class: Rosetta::Translated::Delete

Inherits:
Object
  • Object
show all
Defined in:
lib/rosetta/translated/delete.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record, locale) ⇒ Delete

Returns a new instance of Delete.



5
6
7
8
9
# File 'lib/rosetta/translated/delete.rb', line 5

def initialize(record, locale)
  @record = record
  @locale = locale
  @content = nil
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



3
4
5
# File 'lib/rosetta/translated/delete.rb', line 3

def content
  @content
end

Instance Method Details

#saveObject



11
12
13
# File 'lib/rosetta/translated/delete.rb', line 11

def save
  @record.public_send(:"#{@locale.code}_translation=", nil)
end