Class: Zedlocales::Translations

Inherits:
Object
  • Object
show all
Defined in:
lib/zedlocales/translations.rb

Class Method Summary collapse

Class Method Details

.create(*args) {|reshh| ... } ⇒ Object

Yields:

  • (reshh)


29
30
31
32
33
34
# File 'lib/zedlocales/translations.rb', line 29

def create(*args)
  zopts = args.extract_zedkit_options!
  reshh = Zedkit::Client.create('content/translations', zopts[:user_key], zopts.zdelete_keys!(%w(user_key)))
  yield(reshh) if (not reshh.nil?) && block_given?
  reshh
end

.delete(*args) {|reshh| ... } ⇒ Object

Yields:

  • (reshh)


44
45
46
47
48
49
# File 'lib/zedlocales/translations.rb', line 44

def delete(*args)
  zopts = args.extract_zedkit_options!
  reshh = Zedkit::Client.delete("content/translations/#{zopts[:uuid]}", zopts[:user_key])
  yield(reshh) if (not reshh.nil?) && block_given?
  reshh
end

.get(*args) {|reshh| ... } ⇒ Object

Yields:

  • (reshh)


21
22
23
24
25
26
27
# File 'lib/zedlocales/translations.rb', line 21

def get(*args)
  zopts = args.extract_zedkit_options!
  reshh = Zedkit::Client.get("content/translations/#{zopts[:uuid]}", zopts[:user_key],
                                               zopts.zdelete_keys!(%w(uuid user_key)))
  yield(reshh) if (not reshh.nil?) && block_given?
  reshh
end

.update(*args) {|reshh| ... } ⇒ Object

Yields:

  • (reshh)


36
37
38
39
40
41
42
# File 'lib/zedlocales/translations.rb', line 36

def update(*args)
  zopts = args.extract_zedkit_options!
  reshh = Zedkit::Client.update("content/translations/#{zopts[:uuid]}", zopts[:user_key],
                                                  zopts.zdelete_keys!(%w(uuid user_key)))
  yield(reshh) if (not reshh.nil?) && block_given?
  reshh
end