Method: Mixin::Database#add_model

Defined in:
lib/fox/interface/thor/mixin/database.rb

#add_model(model_name, version, uuid) ⇒ Object

Parameters:

  • model_name (String)
    • name of Structure

  • version (String)
    • version of Structure

  • uuid (String)
    • uuid of Structure



41
42
43
44
45
46
47
48
# File 'lib/fox/interface/thor/mixin/database.rb', line 41

def add_model model_name, version, uuid 
  model = Model.new
  model.name    = model_name
  model.version = version
  model.uuid    = uuid
  
  model.save
end