Module: QuickbaseRecord::Model::ClassMethods

Defined in:
lib/quickbase_record/model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dbidObject

Returns the value of attribute dbid.



18
19
20
# File 'lib/quickbase_record/model.rb', line 18

def dbid
  @dbid
end

#fieldsObject

Returns the value of attribute fields.



18
19
20
# File 'lib/quickbase_record/model.rb', line 18

def fields
  @fields
end

Instance Method Details

#define_fields {|table_definition| ... } ⇒ Object

Yields:

  • (table_definition)


20
21
22
23
24
25
# File 'lib/quickbase_record/model.rb', line 20

def define_fields
  table_definition = TableDefinition.new
  yield table_definition
  @dbid = table_definition.fields[:dbid]
  @fields = table_definition.fields.reject { |field_name, field| field_name == :dbid }
end