Module: CartoDB::Model::Getters::ClassMethods
- Defined in:
- lib/cartodb-rb-client/cartodb/model/getters.rb
Instance Method Summary collapse
- #cartodb_table ⇒ Object
- #columns ⇒ Object
- #connection ⇒ Object
- #data_columns ⇒ Object
- #geometry_type ⇒ Object
- #table_name ⇒ Object
Instance Method Details
#cartodb_table ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/cartodb-rb-client/cartodb/model/getters.rb', line 20 def cartodb_table @cartodb_table = begin connection.table table_name rescue CartoDB::Client::Error nil end end |
#columns ⇒ Object
28 29 30 31 |
# File 'lib/cartodb-rb-client/cartodb/model/getters.rb', line 28 def columns update_cartodb_schema unless schema_synchronized? @columns end |
#connection ⇒ Object
12 13 14 |
# File 'lib/cartodb-rb-client/cartodb/model/getters.rb', line 12 def connection CartoDB::Connection end |
#data_columns ⇒ Object
33 34 35 |
# File 'lib/cartodb-rb-client/cartodb/model/getters.rb', line 33 def data_columns columns.reject{|c| %w(cartodb_id created_at updated_at).include?(c[:name])}.compact end |
#geometry_type ⇒ Object
37 38 39 |
# File 'lib/cartodb-rb-client/cartodb/model/getters.rb', line 37 def geometry_type @geometry_type end |
#table_name ⇒ Object
16 17 18 |
# File 'lib/cartodb-rb-client/cartodb/model/getters.rb', line 16 def table_name @table_name ||= self.name.tableize end |