Class: QuickBase::Objects::Application
- Defined in:
- lib/QuickBaseObjects.rb
Overview
An Application, which is a Table with child Tables, Pages, Roles, Variables.
Instance Attribute Summary collapse
-
#pages ⇒ Object
readonly
Returns the value of attribute pages.
-
#roles ⇒ Object
readonly
Returns the value of attribute roles.
-
#users ⇒ Object
readonly
Returns the value of attribute users.
-
#variables ⇒ Object
readonly
Returns the value of attribute variables.
Attributes inherited from Table
#dbid, #desc, #fields, #info, #name, #pnoun, #queries, #tables
Instance Method Summary collapse
- #addPage(page) ⇒ Object
- #addTable(table) ⇒ Object
- #addUser(role, email, fname, lname, message) ⇒ Object
- #addVariable(variable) ⇒ Object
- #rename(newappname) ⇒ Object
Methods inherited from Table
#addField, #addFieldMethods, #addPageMethods, #addTableMethods, #addUserMethods, #addVariableMethods, #build, #buildAppInfo, #buildField, #buildFields, #buildInfo, #buildInfoField, #buildPage, #buildPages, #buildQueries, #buildQuery, #buildRole, #buildRoles, #buildTable, #buildTables, #buildUser, #buildUsers, #buildVariable, #buildVariables, #deleteField, #initialize, #removeFieldMethods, #runImport
Constructor Details
This class inherits a constructor from QuickBase::Objects::Table
Instance Attribute Details
#pages ⇒ Object (readonly)
Returns the value of attribute pages.
411 412 413 |
# File 'lib/QuickBaseObjects.rb', line 411 def pages @pages end |
#roles ⇒ Object (readonly)
Returns the value of attribute roles.
411 412 413 |
# File 'lib/QuickBaseObjects.rb', line 411 def roles @roles end |
#users ⇒ Object (readonly)
Returns the value of attribute users.
411 412 413 |
# File 'lib/QuickBaseObjects.rb', line 411 def users @users end |
#variables ⇒ Object (readonly)
Returns the value of attribute variables.
411 412 413 |
# File 'lib/QuickBaseObjects.rb', line 411 def variables @variables end |
Instance Method Details
#addPage(page) ⇒ Object
423 424 425 426 427 428 429 |
# File 'lib/QuickBaseObjects.rb', line 423 def addPage(page) raise "#{page} is not a Page object" if !is_a?(Page) pageid = @qbc.addReplaceDBPage(@dbid,nil,page.name, page.type, page.content) page.build( {"id" => pageid}) @pages[pageid] = page addPageMethods(page) end |
#addTable(table) ⇒ Object
412 413 414 415 416 417 |
# File 'lib/QuickBaseObjects.rb', line 412 def addTable(table) raise "#{table} is not a Table object" if !is_a?(Table) newdbid = @qbc.createTable(@dbid, table.pnoun) @tables[newdbid] = table addTableMethods(table) end |
#addUser(role, email, fname, lname, message) ⇒ Object
430 431 432 433 434 435 436 437 438 439 |
# File 'lib/QuickBaseObjects.rb', line 430 def addUser(role,email,fname,lname,) raise "#{role} is not a Role object" if !is_a?(Role) userid = @qbc.provisionUser(@dbid, role.id, email, fname, lname) if userid if @qbc.sendInvitation(@dbid, userid, ) user = User.new user.addInfo(qbc,email) end end end |
#addVariable(variable) ⇒ Object
418 419 420 421 422 |
# File 'lib/QuickBaseObjects.rb', line 418 def addVariable(variable) raise "#{variable} is not a Variable object" if !is_a?(Variable) @variables[variable.name] = variable addVariableMethods(variable) end |
#rename(newappname) ⇒ Object
440 441 442 |
# File 'lib/QuickBaseObjects.rb', line 440 def rename(newappname) @qbc.renameApp(@dbid, newappname) end |