Module: CouchbaseOrm::ActiveRecordCompat::ClassMethods
- Defined in:
- lib/couchbase-orm/base.rb
Instance Method Summary collapse
- #_reflect_on_association(_attribute) ⇒ Object
- #abstract_class? ⇒ Boolean
- #attribute_names ⇒ Object
-
#attributes_builder ⇒ Object
:nodoc:.
- #base_class? ⇒ Boolean
-
#column_names ⇒ Object
can't be an alias for now.
- #connected? ⇒ Boolean
- #primary_key ⇒ Object
- #table_exists? ⇒ Boolean
- #type_for_attribute(attribute) ⇒ Object
Instance Method Details
#_reflect_on_association(_attribute) ⇒ Object
67 68 69 |
# File 'lib/couchbase-orm/base.rb', line 67 def _reflect_on_association(_attribute) false end |
#abstract_class? ⇒ Boolean
55 56 57 |
# File 'lib/couchbase-orm/base.rb', line 55 def abstract_class? false end |
#attribute_names ⇒ Object
84 85 86 |
# File 'lib/couchbase-orm/base.rb', line 84 def attribute_names attribute_types.keys end |
#attributes_builder ⇒ Object
:nodoc:
75 76 77 78 79 80 81 |
# File 'lib/couchbase-orm/base.rb', line 75 def attributes_builder # :nodoc: unless defined?(@attributes_builder) && @attributes_builder defaults = _default_attributes @attributes_builder = ActiveModel::AttributeSet::Builder.new(attribute_types, defaults) end @attributes_builder end |
#base_class? ⇒ Boolean
46 47 48 |
# File 'lib/couchbase-orm/base.rb', line 46 def base_class? true end |
#column_names ⇒ Object
can't be an alias for now
51 52 53 |
# File 'lib/couchbase-orm/base.rb', line 51 def column_names attribute_names end |
#primary_key ⇒ Object
42 43 44 |
# File 'lib/couchbase-orm/base.rb', line 42 def primary_key 'id' end |
#table_exists? ⇒ Boolean
63 64 65 |
# File 'lib/couchbase-orm/base.rb', line 63 def table_exists? true end |
#type_for_attribute(attribute) ⇒ Object
71 72 73 |
# File 'lib/couchbase-orm/base.rb', line 71 def type_for_attribute(attribute) attribute_types[attribute] end |