Class: ActiveMocker::ActiveRecord::Base Private
- Inherits:
-
Object
- Object
- ActiveMocker::ActiveRecord::Base
- Extended by:
- Relationships, Scope, UnknownClassMethod
- Defined in:
- lib/active_mocker/active_record.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Modules: ConstMissing
Class Method Summary collapse
- ._extended ⇒ Object private
- ._included ⇒ Object private
- .const_missing(name) ⇒ Object private
- .extend(name) ⇒ Object private
- .include(name) ⇒ Object private
- .inherited(subclass) ⇒ Object private
- .primary_key ⇒ Object private
- .primary_key=(primary_key) ⇒ Object private
- .table_name ⇒ Object private
- .table_name=(table_name) ⇒ Object private
Methods included from Scope
Methods included from UnknownClassMethod
Methods included from Relationships
belongs_to, collections, has_and_belongs_to_many, has_many, has_one, included, relationships, single_relationships
Class Method Details
._extended ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
69 70 71 |
# File 'lib/active_mocker/active_record.rb', line 69 def self._extended @extended ||= [] end |
._included ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
61 62 63 |
# File 'lib/active_mocker/active_record.rb', line 61 def self._included @included ||= [] end |
.const_missing(name) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
50 51 52 53 54 55 |
# File 'lib/active_mocker/active_record.rb', line 50 def self.const_missing(name) Config.logger.debug "const_missing #{name} from class #{self.name.demodulize }. Creating Class.\n #{caller.first}" m = Module.new m.extend ConstMissing Object.const_set name, m end |
.extend(name) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
65 66 67 |
# File 'lib/active_mocker/active_record.rb', line 65 def self.extend(name) _extended << name end |
.include(name) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
57 58 59 |
# File 'lib/active_mocker/active_record.rb', line 57 def self.include(name) _included << name end |
.inherited(subclass) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 17 18 19 |
# File 'lib/active_mocker/active_record.rb', line 14 def self.inherited(subclass) return if subclass.superclass == Base instance_variables.each do |instance_var| subclass.instance_variable_set(instance_var, instance_variable_get(instance_var)) end end |
.primary_key ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
34 35 36 37 |
# File 'lib/active_mocker/active_record.rb', line 34 def self.primary_key @primary_key ||= nil @primary_key end |
.primary_key=(primary_key) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
30 31 32 |
# File 'lib/active_mocker/active_record.rb', line 30 def self.primary_key=(primary_key) @primary_key = primary_key end |
.table_name ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 28 |
# File 'lib/active_mocker/active_record.rb', line 25 def self.table_name @table_name ||= nil @table_name end |
.table_name=(table_name) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 |
# File 'lib/active_mocker/active_record.rb', line 21 def self.table_name=(table_name) @table_name = table_name end |