Class: Zedkit::Projects::Locales
- Inherits:
-
Object
- Object
- Zedkit::Projects::Locales
- Defined in:
- lib/zedlocales/projects.rb
Class Method Summary collapse
- .create(*args) {|reshh| ... } ⇒ Object
- .delete(*args) {|reshh| ... } ⇒ Object
- .get(*args) {|reshh| ... } ⇒ Object
- .update(*args) {|reshh| ... } ⇒ Object
Class Method Details
.create(*args) {|reshh| ... } ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/zedlocales/projects.rb', line 40 def create(*args) zopts = args. reshh = Zedkit::Client.create("projects/#{zopts[:project][:uuid]}/locales", zopts[:user_key], zopts.zdelete_keys!(%w(user_key project))) yield(reshh) if (not reshh.nil?) && block_given? reshh end |
.delete(*args) {|reshh| ... } ⇒ Object
56 57 58 59 60 61 62 |
# File 'lib/zedlocales/projects.rb', line 56 def delete(*args) zopts = args. reshh = Zedkit::Client.delete("projects/#{zopts[:project][:uuid]}/locales/#{zopts[:locale][:code]}", zopts[:user_key]) yield(reshh) if (not reshh.nil?) && block_given? reshh end |
.get(*args) {|reshh| ... } ⇒ Object
33 34 35 36 37 38 |
# File 'lib/zedlocales/projects.rb', line 33 def get(*args) zopts = args. reshh = Zedkit::Client.get("projects/#{zopts[:project][:uuid]}/locales", zopts[:user_key]) yield(reshh) if (not reshh.nil?) && block_given? reshh end |
.update(*args) {|reshh| ... } ⇒ Object
48 49 50 51 52 53 54 |
# File 'lib/zedlocales/projects.rb', line 48 def update(*args) zopts = args. reshh = Zedkit::Client.update("projects/#{zopts[:project][:uuid]}/locales/#{zopts[:locale][:code]}", zopts[:user_key], zopts.zdelete_keys!(%w(user_key project))) yield(reshh) if (not reshh.nil?) && block_given? reshh end |