Class: CartoDB::Model::Base
- Defined in:
- lib/cartodb-rb-client/cartodb/model/base.rb
Constant Summary
Constants included from Constants
Constants::CARTODB_TYPES, Constants::DEFAULT_ROWS_PER_PAGE, Constants::GEOMETRY_COLUMN, Constants::INVALID_COLUMNS, Constants::RGEO_FACTORY
Instance Attribute Summary
Attributes included from Getters
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Base
constructor
A new instance of Base.
Methods included from Query
Methods included from Persistence
#destroy, included, #new_record?, #save
Methods included from Schema
#cartodb_table_exists?, included, #schema_synchronized?
Methods included from Geo
Methods included from Setters
#attributes=, #cartodb_table=, included
Methods included from Getters
#cartodb_table, #columns, #connection, included, #table_name
Constructor Details
#initialize(attributes = {}) ⇒ Base
Returns a new instance of Base.
12 13 14 15 16 17 |
# File 'lib/cartodb-rb-client/cartodb/model/base.rb', line 12 def initialize(attributes = {}) self.class.cartodb_table = nil self.class.send(:set_geometry_type) unless self.class.send(:geometry_type).present? self.attributes = attributes self.class.send(:update_cartodb_schema) unless schema_synchronized? end |