Class: ZedDB::CLI::Vals
- Inherits:
-
Zedkit::CLI::Bottom
- Object
- Zedkit::CLI::Bottom
- ZedDB::CLI::Vals
- Defined in:
- lib/cli/model_validations.rb
Class Method Summary collapse
Class Method Details
.create(opts = {}) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/cli/model_validations.rb', line 22 def create(opts = {}) opts[:items]['code'] = opts[:argv][1] mv = ZedDB::ModelValidation.new(:user_key => opts[:user_key], :locale => opts[:locale]).replace \ ZedDB::ModelValidations.create(:user_key => opts[:user_key], :locale => opts[:locale], :item => { :uuid => opts[:argv][0] }, :validation => opts[:items]) puts mv.model_item end |
.delete(opts = {}) ⇒ Object
34 35 36 37 38 |
# File 'lib/cli/model_validations.rb', line 34 def delete(opts = {}) mv = ZedDB::ModelValidation.new(:user_key => opts[:user_key], :locale => opts[:locale], :owner => opts[:argv][0], :uuid => opts[:argv][1]) mv.delete puts "\nDONE.\nZedDB Model Validation Removed [#{mv.validation['code']}].\n\n" end |
.update(opts = {}) ⇒ Object
30 31 32 |
# File 'lib/cli/model_validations.rb', line 30 def update(opts = {}) puts "\n" << Zedkit::CLI.ee(opts[:locale], :general, :not_done) << "\n\n" end |